Compute Library
 21.02
CpuPermute Class Reference

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

#include <CpuPermute.h>

Collaboration diagram for CpuPermute:
[legend]

Public Member Functions

 CpuPermute ()=default
 Constructor. More...
 
void configure (const ITensorInfo *src, ITensorInfo *dst, const PermutationVector &perm)
 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, const PermutationVector &perm)
 Static function to check if given info will lead to a valid configuration of CpuPermute. More...
 

Detailed Description

Basic function to run kernels::CpuPermuteKernel.

Definition at line 34 of file CpuPermute.h.

Constructor & Destructor Documentation

◆ CpuPermute()

CpuPermute ( )
default

Constructor.

Member Function Documentation

◆ configure()

void configure ( const ITensorInfo src,
ITensorInfo dst,
const PermutationVector perm 
)

Configure operator for a given list of arguments.

Note
Arbitrary permutation vectors are supported with rank not greater than 4
Parameters
[in]srcSource tensor to permute. Data types supported: All
[out]dstDestintation tensor. Data types supported: Same as src
[in]permPermutation vector

Definition at line 32 of file CpuPermute.cpp.

Referenced by CpuSoftmaxGeneric< IS_LOG >::configure().

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

◆ validate()

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

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

Note
Arbitrary permutation vectors are supported with rank not greater than 4
Parameters
[in]srcSource tensor to permute. Data types supported: All
[in]dstDestination tensor. Data types supported: Same as dst
[in]permPermutation vector
Returns
a status

Definition at line 39 of file CpuPermute.cpp.

References CpuPermuteKernel::validate().

Referenced by NEPermute::validate(), and CpuSoftmaxGeneric< IS_LOG >::validate().

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

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