Compute Library
 20.02.1
IFunction Class Referenceabstract

Base class for all functions. More...

#include <IFunction.h>

Public Member Functions

virtual ~IFunction ()=default
 Destructor. More...
 
virtual void run ()=0
 Run the kernels contained in the function. More...
 
virtual void prepare ()
 Prepare the function for executing. More...
 

Detailed Description

Base class for all functions.

Definition at line 30 of file IFunction.h.

Constructor & Destructor Documentation

◆ ~IFunction()

virtual ~IFunction ( )
virtualdefault

Destructor.

Member Function Documentation

◆ prepare()

◆ run()

virtual void run ( )
pure virtual

Run the kernels contained in the function.

For NEON kernels:

  • Multi-threading is used for the kernels which are parallelisable.
  • By default std::thread::hardware_concurrency() threads are used.
Note
CPPScheduler::set_num_threads() can be used to manually set the number of threads

For OpenCL kernels:

  • All the kernels are enqueued on the queue associated with CLScheduler.
  • The queue is then flushed.
Note
The function will not block until the kernels are executed. It is the user's responsibility to wait.
Will call prepare() on first run if hasn't been done

Implemented in NEDepthwiseConvolutionLayerOptimized, CLDepthwiseConvolutionLayer3x3, CLGEMMConvolutionLayer, NEGEMMConvolutionLayer, CLFullyConnectedLayer, NEFullyConnectedLayer, CLLSTMLayer, CLGEMM, NEConvolutionLayer, NELSTMLayer, CLConvolutionLayer, NELSTMLayerQuantized, CLLSTMLayerQuantized, CLSynthetizeFunctionInitOutputWithZeroAndWithZeroConstantBorder< K, bordersize >, NEGaussianPyramidOrb, CLDirectDeconvolutionLayer, CLGEMMDeconvolutionLayer, NEDeconvolutionLayer, CLGaussianPyramidOrb, CLGenerateProposalsLayer, NEGenerateProposalsLayer, GCConvolutionLayer, FusedConvolutionBatchNormalizationFunction< TargetInfo, FusedLayerTypes >, CLFFTConvolutionLayer, NEFFTConvolutionLayer, NEGEMMLowpMatrixMultiplyCore, FusedDepthwiseConvolutionBatchNormalizationFunction< TargetInfo, FusedLayerTypes >, NEDepthwiseConvolutionAssemblyDispatch, NEGEMM, NEGEMMAssemblyDispatch, CLGEMMLowpMatrixMultiplyCore, CLWinogradConvolutionLayer, CLSpaceToBatchLayer, NESpaceToBatchLayer, CLCropResize, NEDirectConvolutionLayer, CLOpticalFlow, GCGEMM, NECropResize, NEFuseBatchNormalization, CLDepthwiseConvolutionLayer, CLFuseBatchNormalization, CLLocallyConnectedLayer, NELocallyConnectedLayer, NESoftmaxLayerGeneric< IS_LOG >, NEGaussianPyramidHalf, NEDepthwiseConvolutionLayer, CLConvolutionSquare< matrix_size >, CLGaussianPyramidHalf, CLHOGMultiDetection, GCFullyConnectedLayer, NEConvolutionSquare< matrix_size >, NEHOGMultiDetection, CPPBoxWithNonMaximaSuppressionLimit, NEDetectionPostProcessLayer, NEHarrisCorners, CLHarrisCorners, CPPDetectionPostProcessLayer, NEOpticalFlow, CLBatchNormalizationLayer, NEBatchNormalizationLayer, NEConvolutionLayerReshapeWeights, CLSoftmaxLayerGeneric< IS_LOG >, CLLaplacianReconstruct, NELaplacianReconstruct, NECannyEdge, NEConcatenateLayer, NERNNLayer, CLConcatenateLayer, CLPadLayer, NEPadLayer, CLBatchToSpaceLayer, CLDeconvolutionLayerUpsample, CLDirectConvolutionLayer, CLReductionOperation, NEScale, CLConvolutionLayerReshapeWeights, NEWinogradConvolutionLayer, CLArgMinMaxLayer, CLUpsampleLayer, NEIm2Col, CLDeconvolutionLayer, CLFastCorners, CLL2NormalizeLayer, NEArgMinMaxLayer, NEInstanceNormalizationLayer, NENormalizationLayer, CLCannyEdge, CLNormalizationLayer, NESpaceToDepthLayer, CLLaplacianPyramid, CLStackLayer, NELaplacianPyramid, NEReductionOperation, NEStackLayer, GCDirectConvolutionLayer, NEL2NormalizeLayer, CLMeanStdDev, CLMinMaxLocation, CLRNNLayer, NEFastCorners, NEFFT1D, CLFFT1D, CLSobel5x5, CLSobel7x7, CLHOGDetector, CLUnstack, CPPDetectionOutputLayer, GCNormalizePlanarYUVLayer, NEPoolingLayer, NESobel5x5, NESobel7x7, NEUnstack, CLFFT2D, CLGaussian5x5, CLReduceMean, NEFFT2D, NEReduceMean, CLHOGGradient, GCPoolingLayer, NEUpsampleLayer, GCDepthwiseConvolutionLayer3x3, GCSoftmaxLayer, NEGaussian5x5, NEHOGGradient, NERange, CLHOGDescriptor, NEConvertFullyConnectedWeights, NEMinMaxLocation, GCBatchNormalizationLayer, GCNormalizationLayer, NEDerivative, NEEqualizeHistogram, NEHOGDescriptor, NEROIPoolingLayer, GCConvolutionLayerReshapeWeights, CLHistogram, CLSpaceToDepthLayer, GCConcatenateLayer, CLEqualizeHistogram, ICLSimpleFunction, NEGEMMLowpAssemblyMatrixMultiplyCore, GCDropoutLayer, IGCSimpleFunction, NEMeanStdDev, INESimpleFunctionNoBorder, CLIntegralImage, NEFillBorder, NEHistogram, NESimpleAssemblyFunction, CLSplit, NESplit, INESimpleFunction, and ICPPSimpleFunction.


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