Compute Library
 21.02
CpuCopy Class Reference

Basic function to run kernels::CpuCopyKernel. More...

#include <CpuCopy.h>

Collaboration diagram for CpuCopy:
[legend]

Public Member Functions

 CpuCopy ()=default
 Constructor. More...
 
void configure (const ITensorInfo *src, ITensorInfo *dst)
 Configure operator for a given list of arguments. More...
 
- Public Member Functions inherited from INEOperator
 INEOperator (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INEOperator (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INEOperator (INEOperator &&)=default
 Default move constructor. More...
 
INEOperatoroperator= (const INEOperator &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INEOperatoroperator= (INEOperator &&)=default
 Default move assignment operator. More...
 
 ~INEOperator ()
 Default destructor. More...
 
void run (ITensorPack &tensors) override
 Run the kernels contained in the function. More...
 
void prepare (ITensorPack &constants) override
 Prepare the function for executing. More...
 
MemoryRequirements workspace () const override
 Return the memory requirements required by the workspace. More...
 
- Public Member Functions inherited from IOperator
virtual ~IOperator ()=default
 Destructor. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *src, const ITensorInfo *dst)
 Static function to check if given info will lead to a valid configuration of CpuCopy. More...
 

Detailed Description

Basic function to run kernels::CpuCopyKernel.

Definition at line 34 of file CpuCopy.h.

Constructor & Destructor Documentation

◆ CpuCopy()

CpuCopy ( )
default

Constructor.

Member Function Documentation

◆ configure()

void configure ( const ITensorInfo src,
ITensorInfo dst 
)

Configure operator for a given list of arguments.

Parameters
[in]srcSource tensor info. Data type supported: All
[out]dstDestination info. Data type supported: Same as src

Definition at line 32 of file CpuCopy.cpp.

33 {
34  auto k = std::make_unique<kernels::CpuCopyKernel>();
35  k->configure(src, dst);
36  _kernel = std::move(k);
37 }
SimpleTensor< float > src
Definition: DFT.cpp:155

◆ validate()

Status validate ( const ITensorInfo src,
const ITensorInfo dst 
)
static

Static function to check if given info will lead to a valid configuration of CpuCopy.

Parameters
[in]srcSource tensor info. Data type supported: All
[in]dstDestination tensor info. Data type supported: Same as src
Returns
a status

Definition at line 39 of file CpuCopy.cpp.

References CpuCopyKernel::validate().

Referenced by NECopy::validate().

40 {
42 }
SimpleTensor< float > src
Definition: DFT.cpp:155
static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const PaddingList &padding=PaddingList())
Static function to check if given info will lead to a valid configuration of CpuCopyKernel.

The documentation for this class was generated from the following files: