Compute Library
 21.08
IKernel Class Reference

Common information for all the kernels. More...

#include <IKernel.h>

Public Member Functions

 IKernel ()
 Constructor. More...
 
virtual ~IKernel ()=default
 Destructor. More...
 
virtual bool is_parallelisable () const
 Indicates whether or not the kernel is parallelisable. More...
 
virtual BorderSize border_size () const
 The size of the border for that kernel. More...
 
const Windowwindow () const
 The maximum window the kernel can be executed on. More...
 
bool is_window_configured () const
 Function to check if the embedded window of this kernel has been configured. More...
 

Detailed Description

Common information for all the kernels.

Definition at line 33 of file IKernel.h.

Constructor & Destructor Documentation

◆ IKernel()

IKernel ( )

Constructor.

Definition at line 33 of file IKernel.cpp.

References Window::DimX, Window::DimY, and Window::set().

34  : _window()
35 {
36  // Create an empty window to make sure the children classes set the window values themselves
37  _window.set(Window::DimX, Window::Dimension(0, 0, 1));
38  _window.set(Window::DimY, Window::Dimension(0, 0, 1));
39 }
Describe one of the image&#39;s dimensions with a start, end and step.
Definition: Window.h:77
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Definition: Window.h:43
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
Definition: Window.inl:49
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Definition: Window.h:45

◆ ~IKernel()

virtual ~IKernel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ border_size()

BorderSize border_size ( ) const
virtual

The size of the border for that kernel.

Returns
The width in number of elements of the border.

Reimplemented in CLComparisonKernel, CLNormalizationLayerKernel, ClDirectConv2dKernel, CLRemapKernel, ClWinogradInputTransformKernel, CpuDirectConv2dKernel, ClPool2dKernel, CpuPool2dKernel, and ClScaleKernel.

Definition at line 46 of file IKernel.cpp.

Referenced by ICLSimpleKernel::configure(), CLFillBorderKernel::configure(), NEFillBorderKernel::configure(), and NEFillBorderKernel::name().

47 {
48  return BorderSize(0);
49 }
Container for 2D border size.
Definition: Types.h:264

◆ is_parallelisable()

bool is_parallelisable ( ) const
virtual

Indicates whether or not the kernel is parallelisable.

If the kernel is parallelisable then the window returned by window() can be split into sub-windows which can then be run in parallel.

If the kernel is not parallelisable then only the window returned by window() can be passed to run()

Returns
True if the kernel is parallelisable

Reimplemented in CpuWinogradConv2dTransformWeightsKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >, CLFillBorderKernel, CPPTopKVKernel, CPPBoxWithNonMaximaSuppressionLimitKernel, and CPPUpsampleKernel.

Definition at line 41 of file IKernel.cpp.

Referenced by CpuWinogradConv2dTransformWeightsKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::name(), IScheduler::num_threads_hint(), and OMPScheduler::schedule_op().

42 {
43  return true;
44 }

◆ is_window_configured()

bool is_window_configured ( ) const

Function to check if the embedded window of this kernel has been configured.

Returns
True if the windows has been configured

Definition at line 51 of file IKernel.cpp.

References Window::Dimension::end(), Window::Dimension::start(), IKernel::window(), and Window::x().

Referenced by arm_compute::error_on_unconfigured_kernel().

52 {
53  return !((_window.x().start() == _window.x().end()) && (_window.x().end() == 0));
54 }
constexpr int end() const
Return the end of the dimension.
Definition: Window.h:99
constexpr int start() const
Return the start of the dimension.
Definition: Window.h:94
constexpr const Dimension & x() const
Alias to access the first dimension of the window.
Definition: Window.h:145

◆ window()

const Window & window ( ) const

The maximum window the kernel can be executed on.

Returns
The maximum window the kernel can be executed on.

Definition at line 28 of file IKernel.cpp.

Referenced by ICLKernel::add_1D_array_argument(), ICLKernel::add_1D_tensor_argument(), ICLKernel::add_2D_tensor_argument(), ICLKernel::add_3D_tensor_argument(), ICLKernel::add_4D_tensor_argument(), ICLKernel::add_tensor_argument(), ClFillKernel::configure(), CLMaxUnpoolingLayerKernel::configure(), NENormalizationLayerKernel::configure(), ClCastKernel::configure(), NEMaxUnpoolingLayerKernel::configure(), NERemapKernel::configure(), NEROIPoolingLayerKernel::configure(), NEROIAlignLayerKernel::configure(), CpuWeightsReshapeKernel::configure(), arm_compute::test::validation::DATA_TEST_CASE(), ICLKernel::get_target(), CLScheduler::init(), IKernel::is_window_configured(), NEComputeAllAnchorsKernel::name(), NEROIPoolingLayerKernel::name(), NEBatchToSpaceLayerKernel::name(), NEBoundingBoxTransformKernel::name(), NEL2NormalizeLayerKernel::name(), NEMaxUnpoolingLayerKernel::name(), NEPadLayerKernel::name(), NEPriorBoxLayerKernel::name(), CPPTopKVKernel::name(), NEReverseKernel::name(), CPPBoxWithNonMaximaSuppressionLimitKernel::name(), NEChannelShuffleLayerKernel::name(), NEDepthToSpaceLayerKernel::name(), NEFuseBatchNormalizationKernel::name(), NEInstanceNormalizationLayerKernel::name(), NENormalizationLayerKernel::name(), NEQLSTMLayerNormalizationKernel::name(), NERemapKernel::name(), NEReorgLayerKernel::name(), NEROIAlignLayerKernel::name(), NESpaceToDepthLayerKernel::name(), NEBatchNormalizationLayerKernel::name(), CPPUpsampleKernel::name(), NEFFTDigitReverseKernel::name(), NESpaceToBatchLayerKernel::name(), NEStackLayerKernel::name(), NECropKernel::name(), NEFFTScaleKernel::name(), NEFillBorderKernel::name(), CPPPermuteKernel::name(), CPPNonMaximumSuppressionKernel::name(), NEBitwiseAndKernel::name(), NEBitwiseNotKernel::name(), NEBitwiseOrKernel::name(), NEBitwiseXorKernel::name(), NEMeanStdDevNormalizationKernel::name(), NEMinMaxLayerKernel::name(), NEStridedSliceKernel::name(), NEFFTRadixStageKernel::name(), NERangeKernel::name(), NEReductionOperationKernel::name(), NESelectKernel::name(), NETileKernel::name(), NECol2ImKernel::name(), CpuPool2dAssemblyWrapperKernel::name(), NEGatherKernel::name(), CpuWinogradConv2dTransformInputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::name(), CpuWinogradConv2dTransformOutputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::name(), CpuWinogradConv2dTransformWeightsKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::name(), NEGatherKernel::NEGatherKernel(), ICLSimple2DKernel::run(), ICLSimple3DKernel::run(), CLBitwiseKernel::run(), NEBitwiseNotKernel::run(), CPPUpsampleKernel::run(), NEBitwiseAndKernel::run(), NEBitwiseOrKernel::run(), NEBitwiseXorKernel::run(), NERemapKernel::run(), NEROIPoolingLayerKernel::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run(), NETileKernel::run(), NEChannelShuffleLayerKernel::run(), NEDepthToSpaceLayerKernel::run(), NEReverseKernel::run(), NESpaceToDepthLayerKernel::run(), NEPriorBoxLayerKernel::run(), NEFFTScaleKernel::run(), NEComputeAllAnchorsKernel::run(), NEInstanceNormalizationLayerKernel::run(), NEQLSTMLayerNormalizationKernel::run(), CLInstanceNormalizationLayerKernel::run(), CLChannelShuffleLayerKernel::run(), NEReorgLayerKernel::run(), CPPPermuteKernel::run(), NEFFTDigitReverseKernel::run(), CLDepthToSpaceLayerKernel::run(), CLReverseKernel::run(), CLSelectKernel::run(), CLSpaceToDepthLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLRemapKernel::run(), CLComputeAllAnchorsKernel::run(), CLMaxUnpoolingLayerKernel::run(), CLFFTScaleKernel::run(), NEMaxUnpoolingLayerKernel::run(), NERangeKernel::run(), NENormalizationLayerKernel::run(), CLQLSTMLayerNormalizationKernel::run(), NEMeanStdDevNormalizationKernel::run(), CLGatherKernel::run(), CLMinMaxLayerKernel::run(), CLNormalizationLayerKernel::run(), CLComparisonKernel::run(), CLROIPoolingLayerKernel::run(), NEPadLayerKernel::run(), NEMinMaxLayerKernel::run(), NEFillBorderKernel::run(), CLFFTDigitReverseKernel::run(), CLTileKernel::run(), CLMeanStdDevNormalizationKernel::run(), NESelectKernel::run(), NEFFTRadixStageKernel::run(), NEBoundingBoxTransformKernel::run(), CLRangeKernel::run(), CLReorgLayerKernel::run(), NEReductionOperationKernel::run(), NEStackLayerKernel::run(), CPPNonMaximumSuppressionKernel::run(), CLNormalizePlanarYUVLayerKernel::run(), CLReductionOperationKernel::run(), CLPadLayerKernel::run(), CLPriorBoxLayerKernel::run(), NEBatchToSpaceLayerKernel::run(), CLFFTRadixStageKernel::run(), NEROIAlignLayerKernel::run(), CLFillBorderKernel::run(), CLL2NormalizeLayerKernel::run(), CLBoundingBoxTransformKernel::run(), NECropKernel::run(), NEBatchNormalizationLayerKernel::run(), CLStackLayerKernel::run(), NEFuseBatchNormalizationKernel::run(), CLArgMinMaxLayerKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), NESpaceToBatchLayerKernel::run(), CLDeconvolutionReshapeOutputKernel::run(), CLROIAlignLayerKernel::run(), CLBatchToSpaceLayerKernel::run(), CLBatchNormalizationLayerKernel::run(), CLFuseBatchNormalizationKernel::run(), CLSpaceToBatchLayerKernel::run(), CLComputeMeanVariance::run(), CpuFillKernel::run_op(), ClElementwiseKernel::run_op(), CpuConvertQuantizedSignednessKernel::run_op(), CpuDequantizeKernel::run_op(), CpuLogits1DMaxKernel::run_op(), CpuTransposeKernel::run_op(), CpuCopyKernel::run_op(), CpuReshapeKernel::run_op(), ClReshapeKernel::run_op(), ClTransposeKernel::run_op(), ClDequantizeKernel::run_op(), ClFloorKernel::run_op(), CpuConcatenateBatchKernel::run_op(), CpuPermuteKernel::run_op(), ClCopyKernel::run_op(), ClFillKernel::run_op(), ClElementWiseUnaryKernel::run_op(), CpuConcatenateHeightKernel::run_op(), CpuConcatenateWidthKernel::run_op(), CpuActivationKernel::run_op(), ClWidthConcatenate2TensorsKernel::run_op(), CpuQuantizeKernel::run_op(), CpuPool2dKernel::run_op(), ClHeightConcatenateKernel::run_op(), ClPool2dKernel::run_op(), ClScaleKernel::run_op(), ClWidthConcatenateKernel::run_op(), ClActivationKernel::run_op(), ClQuantizeKernel::run_op(), NELogicalKernel::run_op(), CpuFloorKernel::run_op(), ClPermuteKernel::run_op(), ClWidthConcatenate4TensorsKernel::run_op(), CpuConvertFullyConnectedWeightsKernel::run_op(), ClBatchConcatenateKernel::run_op(), ClDepthConcatenateKernel::run_op(), CpuScaleKernel::run_op(), CpuConcatenateDepthKernel::run_op(), ClConvertFullyConnectedWeightsKernel::run_op(), ClCropKernel::run_op(), CpuGemmMatrixAdditionKernel::run_op(), CpuGemmLowpMatrixAReductionKernel::run_op(), CpuAddKernel::run_op(), ClGemmLowpMatrixMultiplyNativeKernel::run_op(), ClGemmReshapeLhsMatrixKernel::run_op(), CpuDirectConv2dOutputStageKernel::run_op(), CpuSubKernel::run_op(), CpuGemmMatrixMultiplyKernel::run_op(), CpuGemmLowpMatrixMultiplyKernel::run_op(), CpuDepthwiseConv2dNativeKernel::run_op(), ClWinogradInputTransformKernel::run_op(), CpuCastKernel::run_op(), ClGemmLowpQuantizeDownInt32ScaleByFixedPointKernel::run_op(), ClCastKernel::run_op(), CpuGemmInterleave4x4Kernel::run_op(), ClGemmLowpQuantizeDownInt32ScaleKernel::run_op(), ClGemmLowpQuantizeDownInt32ScaleByFloatKernel::run_op(), ClGemmMatrixMultiplyNativeKernel::run_op(), CpuGemmLowpOffsetContributionKernel::run_op(), ClGemmMatrixMultiplyKernel::run_op(), CpuGemmLowpQuantizeDownInt32ScaleKernel::run_op(), CpuGemmLowpQuantizeDownInt32ToInt16ScaleByFixedPointKernel::run_op(), ClDirectConv2dKernel::run_op(), ClGemmLowpMatrixMultiplyReshapedKernel::run_op(), ClGemmReshapeRhsMatrixKernel::run_op(), CLStridedSliceKernel::run_op(), CpuGemmLowpQuantizeDownInt32ToInt8ScaleByFixedPointKernel::run_op(), CpuGemmLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel::run_op(), CpuMulKernel::run_op(), ClCol2ImKernel::run_op(), ClGemmLowpOffsetContributionKernel::run_op(), ClGemmLowpOffsetContributionOutputStageKernel::run_op(), ClLogits1DMaxShiftExpSumKernel::run_op(), CpuWeightsReshapeKernel::run_op(), ClMulKernel::run_op(), ClGemmLowpMatrixAReductionKernel::run_op(), ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel::run_op(), ClWeightsReshapeKernel::run_op(), CLFillBorderKernel::run_op(), ClGemmMatrixMultiplyReshapedOnlyRhsKernel::run_op(), CpuGemmTranspose1xWKernel::run_op(), ClIm2ColKernel::run_op(), NEStridedSliceKernel::run_op(), CpuLogits1DSoftmaxKernel< IS_LOG >::run_op(), ClGemmMatrixMultiplyReshapedKernel::run_op(), CpuGemmLowpOffsetContributionOutputStageKernel::run_op(), ClComplexMulKernel::run_op(), ClLogits1DNormKernel::run_op(), ClGemmLowpMatrixBReductionKernel::run_op(), CpuGemmLowpMatrixBReductionKernel::run_op(), CpuComplexMulKernel::run_op(), SingleThreadScheduler::schedule(), OMPScheduler::schedule(), CPPScheduler::schedule(), CpuQuantizeKernel::validate(), CpuGemmLowpMatrixAReductionKernel::validate(), CpuDepthwiseConv2dNativeKernel::validate(), NEComputeAllAnchorsKernel::validate(), NEFFTDigitReverseKernel::validate(), NEBoundingBoxTransformKernel::validate(), and CpuGemmLowpMatrixBReductionKernel::validate().

29 {
30  return _window;
31 }

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