Compute Library
 23.05
CLBuildOptions Class Referencefinal

Build options. More...

#include <CLCompileContext.h>

Public Member Functions

 CLBuildOptions ()
 Default constructor. More...
 
void add_option (std::string option)
 Adds option to the existing build option list. More...
 
void add_option_if (bool cond, std::string option)
 Adds option if a given condition is true;. More...
 
void add_option_if_else (bool cond, std::string option_true, std::string option_false)
 Adds first option if condition is true else the second one. More...
 
void add_options (const StringSet &options)
 Appends given build options to the current's objects options. More...
 
void add_options_if (bool cond, const StringSet &options)
 Appends given build options to the current's objects options if a given condition is true. More...
 
const StringSet & options () const
 Gets the current options list set. More...
 
bool operator== (const CLBuildOptions &other) const
 

Detailed Description

Build options.

Definition at line 38 of file CLCompileContext.h.

Constructor & Destructor Documentation

◆ CLBuildOptions()

Default constructor.

Definition at line 36 of file CLCompileContext.cpp.

37  : _build_opts()
38 {
39 }

Member Function Documentation

◆ add_option()

void add_option ( std::string  option)

Adds option to the existing build option list.

Parameters
[in]optionOption to add

Definition at line 41 of file CLCompileContext.cpp.

Referenced by CLBuildOptions::add_option_if(), CLBuildOptions::add_option_if_else(), ClElementwiseKernel::ClElementwiseKernel(), ClTransposedConvolutionKernel::configure(), ClTransposeKernel::configure(), ClDequantizeKernel::configure(), ClFloorKernel::configure(), ClElementWiseUnaryKernel::configure(), ClCopyKernel::configure(), ClFillKernel::configure(), ClScaleKernel::configure(), ClWidthConcatenate2TensorsKernel::configure(), ClMatMulNativeKernel::configure(), ClPool2dKernel::configure(), ClPool3dKernel::configure(), ClHeightConcatenateKernel::configure(), ClActivationKernel::configure(), ClWidthConcatenateKernel::configure(), ClMatMulLowpNativeKernel::configure(), ClQuantizeKernel::configure(), ClPermuteKernel::configure(), ClWidthConcatenate4TensorsKernel::configure(), CLStridedSliceKernel::configure(), ClBatchConcatenateKernel::configure(), ClCropKernel::configure(), ClDepthConcatenateKernel::configure(), ClGemmLowpMatrixMultiplyNativeKernel::configure(), ClConvertFullyConnectedWeightsKernel::configure(), ClGemmReshapeLhsMatrixKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), CLBitwiseKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), CLInstanceNormalizationLayerKernel::configure(), ClIndirectConv2dKernel::configure(), CLMaxUnpoolingLayerKernel::configure(), ClWinogradInputTransformKernel::configure(), CLReverseKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleByFixedPointKernel::configure(), CLSelectKernel::configure(), ClIndirectConv2dAddressPrecalculationKernel::configure(), CLChannelShuffleLayerKernel::configure(), CLSpaceToDepthLayerKernel::configure(), ClWinogradOutputTransformKernel::configure(), CLDepthToSpaceLayerKernel::configure(), ClLogits1DMaxShiftExpSumKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleByFloatKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleKernel::configure(), CLComputeAllAnchorsKernel::configure(), CLDeconvolutionLayerUpsampleKernel::configure(), ClCastKernel::configure(), CLFFTScaleKernel::configure(), CLSpaceToBatchLayerKernel::configure(), CLGatherKernel::configure(), CLNormalizationLayerKernel::configure(), CLQLSTMLayerNormalizationKernel::configure(), ClGemmLowpMatrixMultiplyReshapedKernel::configure(), CLTileKernel::configure(), CLReorgLayerKernel::configure(), CLBatchToSpaceLayerKernel::configure(), CLFFTDigitReverseKernel::configure(), ClGemmLowpOffsetContributionKernel::configure(), ClGemmLowpOffsetContributionOutputStageKernel::configure(), ClGemmReshapeRhsMatrixKernel::configure(), CLMeanStdDevNormalizationKernel::configure(), CLRangeKernel::configure(), CLNormalizePlanarYUVLayerKernel::configure(), ClDirectConv2dKernel::configure(), ClCol2ImKernel::configure(), CLPadLayerKernel::configure(), CLFFTRadixStageKernel::configure(), CLPriorBoxLayerKernel::configure(), ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel::configure(), ClDirectConv3dKernel::configure(), CLL2NormalizeLayerKernel::configure(), CLBoundingBoxTransformKernel::configure(), ClMulKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), CLROIPoolingLayerKernel::configure(), CLFillBorderKernel::configure(), ClGemmLowpMatrixAReductionKernel::configure(), CLStackLayerKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsKernel::configure(), ClWeightsReshapeKernel::configure(), CLArgMinMaxLayerKernel::configure(), CLROIAlignLayerKernel::configure(), CLDeconvolutionReshapeOutputKernel::configure(), CLBatchNormalizationLayerKernel::configure(), CLFuseBatchNormalizationKernel::configure(), ClGemmMatrixMultiplyReshapedKernel::configure(), ClComplexMulKernel::configure(), ClLogits1DNormKernel::configure(), CLComputeMeanVariance::configure(), ClGemmLowpMatrixBReductionKernel::configure(), ClTemplateCast::get_build_options(), ClTemplateDepthwiseConv2d::get_build_options(), ClTemplateDirectConv2d::get_build_options(), ClTemplateResize::get_build_options(), ClTemplateActivation::get_build_options(), ClTemplatePool2d::get_build_options(), PostOpCLKernelUtils::set_post_ops_cl_build_options(), and arm_compute::set_unroll_with_pragma().

42 {
43  _build_opts.emplace(std::move(option));
44 }

◆ add_option_if()

void add_option_if ( bool  cond,
std::string  option 
)

Adds option if a given condition is true;.

Parameters
[in]condCondition to check
[in]optionOption to add if condition is true

Definition at line 46 of file CLCompileContext.cpp.

References CLBuildOptions::add_option().

Referenced by ClTransposedConvolutionKernel::configure(), ClDequantizeKernel::configure(), ClFillKernel::configure(), ClScaleKernel::configure(), ClPool2dKernel::configure(), ClPool3dKernel::configure(), ClActivationKernel::configure(), ClQuantizeKernel::configure(), CLStridedSliceKernel::configure(), ClCropKernel::configure(), ClGemmLowpMatrixMultiplyNativeKernel::configure(), ClGemmReshapeLhsMatrixKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), ClIndirectConv2dKernel::configure(), ClWinogradInputTransformKernel::configure(), CLInstanceNormalizationLayerKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), CLChannelShuffleLayerKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleByFixedPointKernel::configure(), ClLogits1DMaxShiftExpSumKernel::configure(), ClWinogradOutputTransformKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleByFloatKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleKernel::configure(), CLNormalizationLayerKernel::configure(), CLFFTScaleKernel::configure(), CLTileKernel::configure(), ClGemmLowpMatrixMultiplyReshapedKernel::configure(), CLFFTDigitReverseKernel::configure(), ClGemmReshapeRhsMatrixKernel::configure(), ClDirectConv2dKernel::configure(), CLPriorBoxLayerKernel::configure(), CLFFTRadixStageKernel::configure(), ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel::configure(), ClMulKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsKernel::configure(), ClWeightsReshapeKernel::configure(), CLArgMinMaxLayerKernel::configure(), CLROIAlignLayerKernel::configure(), CLDeconvolutionReshapeOutputKernel::configure(), CLFuseBatchNormalizationKernel::configure(), ClGemmMatrixMultiplyReshapedKernel::configure(), and CLComputeMeanVariance::configure().

47 {
48  if(cond)
49  {
50  add_option(std::move(option));
51  }
52 }
void add_option(std::string option)
Adds option to the existing build option list.

◆ add_option_if_else()

void add_option_if_else ( bool  cond,
std::string  option_true,
std::string  option_false 
)

Adds first option if condition is true else the second one.

Parameters
[in]condCondition to check
[in]option_trueOption to add if condition is true
[in]option_falseOption to add if condition is false

Definition at line 54 of file CLCompileContext.cpp.

References CLBuildOptions::add_option().

Referenced by ClScaleKernel::configure(), ClMatMulNativeKernel::configure(), CLStridedSliceKernel::configure(), ClGemmReshapeLhsMatrixKernel::configure(), ClIndirectConv2dKernel::configure(), ClDirectConv2dKernel::configure(), ClMulKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), and CLArgMinMaxLayerKernel::configure().

55 {
56  (cond) ? add_option(std::move(option_true)) : add_option(std::move(option_false));
57 }
void add_option(std::string option)
Adds option to the existing build option list.

◆ add_options()

void add_options ( const StringSet &  options)

Appends given build options to the current's objects options.

Parameters
[in]optionsBuild options to append

Definition at line 59 of file CLCompileContext.cpp.

Referenced by CLBuildOptions::add_options_if(), and ClTemplateWriter::get_build_options().

60 {
61  _build_opts.insert(options.begin(), options.end());
62 }
const StringSet & options() const
Gets the current options list set.

◆ add_options_if()

void add_options_if ( bool  cond,
const StringSet &  options 
)

Appends given build options to the current's objects options if a given condition is true.

Parameters
[in]condCondition to check
[in]optionsOption to add if condition is true

Definition at line 64 of file CLCompileContext.cpp.

References CLBuildOptions::add_options().

Referenced by ClLogits1DMaxShiftExpSumKernel::configure().

65 {
66  if(cond)
67  {
69  }
70 }
const StringSet & options() const
Gets the current options list set.
void add_options(const StringSet &options)
Appends given build options to the current&#39;s objects options.

◆ operator==()

bool operator== ( const CLBuildOptions other) const

Definition at line 77 of file CLCompileContext.cpp.

78 {
79  return _build_opts == other._build_opts;
80 }

◆ options()

const CLBuildOptions::StringSet & options ( ) const

Gets the current options list set.

Returns
Build options set

Definition at line 72 of file CLCompileContext.cpp.

Referenced by ClElementwiseKernel::ClElementwiseKernel(), ClTransposedConvolutionKernel::configure(), ClDequantizeKernel::configure(), ClTransposeKernel::configure(), ClFloorKernel::configure(), ClElementWiseUnaryKernel::configure(), ClFillKernel::configure(), ClWidthConcatenate2TensorsKernel::configure(), ClScaleKernel::configure(), ClActivationKernel::configure(), ClMatMulNativeKernel::configure(), ClPool2dKernel::configure(), ClPool3dKernel::configure(), ClMatMulLowpNativeKernel::configure(), ClQuantizeKernel::configure(), ClWidthConcatenate4TensorsKernel::configure(), ClPermuteKernel::configure(), ClCropKernel::configure(), CLStridedSliceKernel::configure(), ClConvertFullyConnectedWeightsKernel::configure(), ClGemmLowpMatrixMultiplyNativeKernel::configure(), ClGemmReshapeLhsMatrixKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), ClWinogradInputTransformKernel::configure(), CLMaxUnpoolingLayerKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), ClIndirectConv2dKernel::configure(), CLBitwiseKernel::configure(), CLInstanceNormalizationLayerKernel::configure(), CLChannelShuffleLayerKernel::configure(), CLReverseKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleByFixedPointKernel::configure(), CLSelectKernel::configure(), ClIndirectConv2dAddressPrecalculationKernel::configure(), ClWinogradOutputTransformKernel::configure(), ClLogits1DMaxShiftExpSumKernel::configure(), CLDeconvolutionLayerUpsampleKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleKernel::configure(), ClGemmLowpQuantizeDownInt32ScaleByFloatKernel::configure(), CLNormalizationLayerKernel::configure(), CLFFTScaleKernel::configure(), CLQLSTMLayerNormalizationKernel::configure(), CLSpaceToBatchLayerKernel::configure(), CLGatherKernel::configure(), ClGemmLowpMatrixMultiplyReshapedKernel::configure(), CLTileKernel::configure(), CLFFTDigitReverseKernel::configure(), CLBatchToSpaceLayerKernel::configure(), ClGemmReshapeRhsMatrixKernel::configure(), CLNormalizePlanarYUVLayerKernel::configure(), ClDirectConv2dKernel::configure(), CLRangeKernel::configure(), ClCol2ImKernel::configure(), CLFFTRadixStageKernel::configure(), CLPriorBoxLayerKernel::configure(), CLL2NormalizeLayerKernel::configure(), ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel::configure(), ClDirectConv3dKernel::configure(), ClMulKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsKernel::configure(), CLFillBorderKernel::configure(), CLROIPoolingLayerKernel::configure(), ClWeightsReshapeKernel::configure(), CLArgMinMaxLayerKernel::configure(), CLROIAlignLayerKernel::configure(), CLDeconvolutionReshapeOutputKernel::configure(), CLFuseBatchNormalizationKernel::configure(), ClGemmMatrixMultiplyReshapedKernel::configure(), and CLComputeMeanVariance::configure().

73 {
74  return _build_opts;
75 }

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