Compute Library  18.05
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

virtual ~IFunction ( )
virtualdefault

Destructor.

Member Function Documentation

virtual void prepare ( )
inlinevirtual

Prepare the function for executing.

Any one off pre-processing step required by the function is handled here

Note
Prepare stage might not need all the function's buffers' backing memory to be available in order to execute

Reimplemented in CLGEMMConvolutionLayer, CLFullyConnectedLayer, CLConvolutionLayer, CLGEMM, and CLWinogradConvolutionLayer.

Definition at line 57 of file IFunction.h.

58  {
59  }
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 CLLSTMLayer, CLGEMMConvolutionLayer, NEGEMMConvolutionLayer, CLDepthwiseConvolutionLayer, GCConvolutionLayer, NEFullyConnectedLayer, NEDepthwiseConvolutionLayer, NEGaussianPyramidOrb, NEConvolutionLayer, CLGaussianPyramidOrb, CLFullyConnectedLayer, NEDeconvolutionLayer, CLConvolutionLayer, CLGEMM, CLWinogradConvolutionLayer, NEDirectConvolutionLayer, CLOpticalFlow, CLDeconvolutionLayer, CLLocallyConnectedLayer, NELocallyConnectedLayer, NEGaussianPyramidHalf, CLGaussianPyramidHalf, CLConvolutionSquare< matrix_size >, CLHOGMultiDetection, NEConvolutionSquare< matrix_size >, NEHarrisCorners, NEHOGMultiDetection, GCGEMM, NEGEMMLowpMatrixMultiplyCore, CLDepthwiseConvolutionLayer3x3, CLHarrisCorners, NEOpticalFlow, CLBatchNormalizationLayer, CLGEMMLowpMatrixMultiplyCore, NEBatchNormalizationLayer, NECannyEdge, GCFullyConnectedLayer, NEConvolutionLayerReshapeWeights, CLLaplacianReconstruct, NELaplacianReconstruct, CLDeconvolutionLayerUpsample, CLDirectConvolutionLayer, CLConvolutionLayerReshapeWeights, NEWinogradConvolutionLayer, CLFastCorners, CLL2NormalizeLayer, CLReductionOperation, NENormalizationLayer, NEGEMM, NEScale, CLLaplacianPyramid, NEIm2Col, NELaplacianPyramid, CLDepthwiseSeparableConvolutionLayer, CLDequantizationLayer, GCDirectConvolutionLayer, NEDepthwiseSeparableConvolutionLayer, NEFullyConnectedLayerReshapeWeights, NEL2NormalizeLayer, NESoftmaxLayer, CLMinMaxLocation, CLNormalizationLayer, CLRNNLayer, CLSoftmaxLayer, NEFastCorners, CLCannyEdge, CLSobel5x5, CLSobel7x7, CLHOGDetector, NEDepthwiseConvolutionLayer3x3, NEDequantizationLayer, NEPoolingLayer, NEReductionOperation, NEQuantizationLayer, NESobel5x5, NESobel7x7, CLGaussian5x5, CLWidthConcatenateLayer, CLHOGGradient, CLQuantizationLayer, GCPoolingLayer, NEGaussian5x5, NEHOGGradient, CLHOGDescriptor, NEMinMaxLocation, GCBatchNormalizationLayer, GCNormalizationLayer, NEDerivative, NEEqualizeHistogram, NEHOGDescriptor, GCConvolutionLayerReshapeWeights, NEROIPoolingLayer, CLDepthConcatenateLayer, GCDepthwiseConvolutionLayer3x3, CLHistogram, GCSoftmaxLayer, CLEqualizeHistogram, GCDepthConcatenateLayer, NEConvertFullyConnectedWeights, NEDepthConcatenateLayer, NEGEMMLowpAssemblyMatrixMultiplyCore, GCNormalizePlanarYUVLayer, GCDropoutLayer, NEMeanStdDev, CLIntegralImage, NEFillBorder, NEHistogram, CLMeanStdDev, ICLSimpleFunction, IGCSimpleFunction, INESimpleFunction, and ICPPSimpleFunction.


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