Compute Library
 23.11
ITensorInfo Class Referenceabstract

Store the tensor's metadata. More...

#include <ITensorInfo.h>

Collaboration diagram for ITensorInfo:
[legend]

Public Types

using TensorDimsState = std::vector< int >
 
using Id = int32_t
 An id that uniquely identifies an ITensorInfo within some domain (e.g. More...
 

Public Member Functions

virtual ~ITensorInfo ()=default
 Default virtual destructor. More...
 
virtual ITensorInfoset_data_type (DataType data_type)=0
 Set the data type to the specified value. More...
 
virtual ITensorInfoset_num_channels (int num_channels)=0
 Set the number of channels to the specified value. More...
 
virtual ITensorInfoset_format (Format format)=0
 Set the format of an already initialized tensor. More...
 
virtual ITensorInfoset_tensor_shape (const TensorShape &shape)=0
 Set the shape of an already initialized tensor. More...
 
virtual ITensorInfoset_tensor_dims_state (const TensorDimsState &state)=0
 Set the state for each dimension of the tensor. More...
 
virtual ITensorInfoset_quantization_info (const QuantizationInfo &quantization_info)=0
 Set the quantization settings (scale and offset) of the tensor. More...
 
virtual ITensorInfoset_data_layout (const DataLayout &data_layout)=0
 Set the data layout of the tensor. More...
 
virtual ITensorInforeset_padding ()=0
 Resets the padding settings of the tensor. More...
 
virtual bool auto_padding ()=0
 Update the offset to the first element and the strides to automatically computed values. More...
 
virtual ITensorInfoset_lock_paddings (bool flag)=0
 Set the lock paddings flag of the tensor. More...
 
virtual bool lock_paddings () const =0
 Get the lock paddings flag value. More...
 
virtual bool extend_padding (const PaddingSize &padding)=0
 Update the offset to the first element, the strides and the total size. More...
 
virtual size_t dimension (size_t index) const =0
 Return the size of the requested dimension. More...
 
virtual size_t dimension (DataLayoutDimension dimension) const =0
 Return the size of the requested data layout dimension. More...
 
virtual const Stridesstrides_in_bytes () const =0
 The strides in bytes for accessing each dimension of the tensor. More...
 
virtual size_t offset_first_element_in_bytes () const =0
 The offset from the beginning of the memory allocation to the first element of the tensor. More...
 
virtual int32_t offset_element_in_bytes (const Coordinates &pos) const =0
 The offset in bytes from the beginning of the memory allocation to access the element at position (x, y, z ...) More...
 
virtual size_t element_size () const =0
 Element size in bytes calculated as data_size() * num_channels() More...
 
virtual size_t num_dimensions () const =0
 The number of dimensions of the tensor (rank) More...
 
virtual size_t num_channels () const =0
 The number of channels for each tensor element. More...
 
virtual const TensorShapetensor_shape () const =0
 Size for each dimension of the tensor. More...
 
virtual const TensorDimsStatetensor_dims_state () const =0
 State of each dimension of the tensor shape. More...
 
virtual DataType data_type () const =0
 Data type used for each element of the tensor. More...
 
virtual Format format () const =0
 Colour format of the image. More...
 
virtual size_t total_size () const =0
 Returns the total size of the tensor in bytes. More...
 
virtual PaddingSize padding () const =0
 Padding of tensor. More...
 
virtual bool has_padding () const =0
 Checks if the tensor has been allocated with padding or not. More...
 
virtual bool is_resizable () const =0
 Flag indicating whether the size of the tensor can be changed. More...
 
virtual bool is_dynamic () const =0
 Flag indicating whether the shape of the tensor is dynamic, meaning that it can change on kernel/function execution. More...
 
virtual bool are_values_constant () const =0
 Flag indicating whether the values of the tensor are constant, meaning that they can change on kernel/function execution. More...
 
virtual ITensorInfoset_is_resizable (bool is_resizable)=0
 Set the flag whether the tensor size can be changed. More...
 
virtual ITensorInfoset_are_values_constant (bool are_values_constant)=0
 Set the flag whether the tensor values can change during kernel/function execution. More...
 
virtual ValidRegion valid_region () const =0
 Valid region of the tensor. More...
 
virtual void set_valid_region (const ValidRegion &valid_region)=0
 Set the valid region of the tensor. More...
 
virtual QuantizationInfo quantization_info () const =0
 Get the quantization settings (scale and offset) of the tensor. More...
 
virtual DataLayout data_layout () const =0
 Get the data layout of the tensor. More...
 
virtual Id id () const =0
 Get the workload tensor id of the tensor. More...
 
virtual ITensorInfoset_id (ITensorInfo::Id id)=0
 Set the tensor id. More...
 
bool has_valid_id () const
 Check if the tensor id is valid. More...
 
- Public Member Functions inherited from ICloneable< ITensorInfo >
virtual ~ICloneable ()=default
 Default virtual desctructor. More...
 
virtual std::unique_ptr< ITensorInfoclone () const=0
 Provide a clone of the current object of class T. More...
 

Static Public Member Functions

static constexpr int32_t get_dynamic_state_value ()
 Get the value representing dynamic dimension state. More...
 
static constexpr int32_t get_static_state_value ()
 Get the value representing static dimension state. More...
 
template<typename... Infos>
static std::pair< TensorShape, ValidRegionbroadcast_shape_and_valid_region (const Infos &...infos)
 If infos are broadcast compatible tensor info's, return the broadcasted shape and the intersection of the broadcasted valid regions of the tensors. More...
 

Static Public Attributes

static constexpr Id invalid_tensor_id = 0
 An invalid tensor id within a domain. More...
 

Detailed Description

Store the tensor's metadata.

Definition at line 44 of file ITensorInfo.h.

Member Typedef Documentation

◆ Id

using Id = int32_t

An id that uniquely identifies an ITensorInfo within some domain (e.g.

a workload)

Definition at line 50 of file ITensorInfo.h.

◆ TensorDimsState

using TensorDimsState = std::vector<int>

Definition at line 47 of file ITensorInfo.h.

Constructor & Destructor Documentation

◆ ~ITensorInfo()

virtual ~ITensorInfo ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ are_values_constant()

◆ auto_padding()

virtual bool auto_padding ( )
pure virtual

Update the offset to the first element and the strides to automatically computed values.

Note
The padding used by this method is really conservative so that the tensor can be used for most functions.
Returns
True if the strides or the offset to the first element have changed.

Implemented in TensorInfo, and SubTensorInfo.

Referenced by SubTensorInfo::auto_padding(), and AccessWindowAutoPadding::update_padding_if_needed().

◆ broadcast_shape_and_valid_region()

static std::pair<TensorShape, ValidRegion> broadcast_shape_and_valid_region ( const Infos &...  infos)
inlinestatic

If infos are broadcast compatible tensor info's, return the broadcasted shape and the intersection of the broadcasted valid regions of the tensors.

Two tensor info's are broadcast compatible if their shapes are broadcast compatible.

Two tensor shapes are broadcast compatible if for each dimension, they're equal or one of them is 1.

If two shapes are compatible, each dimension in the broadcasted shape is the max of the original dimensions.

Parameters
[in]infosTensor info's.
Returns
The broadcasted shape and valid region, or an empty shape and valid region if the info's are not broadcast compatible.

Definition at line 332 of file ITensorInfo.h.

333  {
334  TensorShape bc_shape = TensorShape::broadcast_shape(infos.tensor_shape()...);
335  ValidRegion bc_valid_region{Coordinates(), bc_shape};
336 
337  auto broadcast_valid_region = [&bc_valid_region](const ITensorInfo &info)
338  {
339  if (info.num_dimensions() != 0)
340  {
341  for (size_t d = 0; d < bc_valid_region.shape.num_dimensions(); ++d)
342  {
343  const bool is_broadcast = (info.tensor_shape()[d] == 1);
344 
345  const int anchor_max = std::max(bc_valid_region.anchor[d], info.valid_region().anchor[d]);
346  const size_t valid_min = std::min(bc_valid_region.shape[d], info.valid_region().shape[d]);
347 
348  if (!is_broadcast || (valid_min == 0))
349  {
350  bc_valid_region.anchor.set(d, anchor_max);
351  bc_valid_region.shape.set(d, valid_min);
352  }
353  }
354  }
355  };
356 
357  utility::for_each(broadcast_valid_region, infos...);
358 
359  return std::pair<TensorShape, ValidRegion>(bc_shape, bc_valid_region);
360  }

References TensorShape::broadcast_shape(), arm_compute::utility::for_each(), and arm_compute::test::validation::info.

◆ data_layout()

virtual DataLayout data_layout ( ) const
pure virtual

◆ data_type()

virtual DataType data_type ( ) const
pure virtual

Data type used for each element of the tensor.

Returns
Tensor data type

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::auto_init_if_empty(), ClMatMulNativeDefaultConfigValhall::configure(), CpuAddMulAdd::configure(), ClTransposedConvolutionKernel::configure(), NELogicalKernel::configure(), ClMatMulLowpNativeMMULKernel::configure(), ClWidthConcatenate2TensorsKernel::configure(), ClWidthConcatenate4TensorsKernel::configure(), ClMatMulNativeKernel::configure(), ClMatMulLowpNativeKernel::configure(), ClGemmLowpMatrixMultiplyNativeKernel::configure(), NEComputeAllAnchorsKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), NEQLSTMLayerNormalizationKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel::configure(), CPPBoxWithNonMaximaSuppressionLimit::configure(), CLSelectKernel::configure(), NENormalizationLayerKernel::configure(), ClIndirectConv2dKernel::configure(), CpuSubKernel::configure(), CLComputeAllAnchorsKernel::configure(), NERangeKernel::configure(), CLSpaceToDepthLayerKernel::configure(), CPPDetectionPostProcessLayer::configure(), NEBoundingBoxTransformKernel::configure(), CLComparisonKernel::configure(), CpuAddMulAddKernel::configure(), CpuDirectConv3dKernel::configure(), ClGemmLowpMatrixMultiplyReshapedKernel::configure(), CpuDepthwiseConv2dNativeKernel::configure(), NESelectKernel::configure(), CLBatchToSpaceLayerKernel::configure(), CpuDepthwiseConv2dAssemblyWrapperKernel::configure(), CpuMatMul::configure(), CpuAddKernel::configure(), CpuGemmMatrixMultiplyKernel::configure(), NEGatherKernel::configure(), CLRangeKernel::configure(), NEReduceMean::configure(), CpuMulKernel::configure(), ClDirectConv2dKernel::configure(), CpuSoftmaxGeneric< IS_LOG >::configure(), ClDirectConv3dKernel::configure(), ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel::configure(), ClMatMulNativeMMULKernel::configure(), CLArgMinMaxLayerKernel::configure(), ClMulKernel::configure(), CLReduceMean::configure(), CLBoundingBoxTransformKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), CLPriorBoxLayerKernel::configure(), NEDetectionPostProcessLayer::configure(), NEArgMinMaxLayer::configure(), ClGemmLowpMatrixAReductionKernel::configure(), CLDeconvolutionLayerUpsample::configure(), ClGemmMatrixMultiplyReshapedKernel::configure(), CLDepthwiseConvolutionLayer::configure(), CLFuseBatchNormalizationKernel::configure(), ClGemm::configure(), CLArgMinMaxLayer::configure(), ClGemmLowpMatrixMultiplyCore::configure(), NEGenerateProposalsLayer::configure(), ClGemmConv2d::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), ClGemmLowpMatrixBReductionKernel::configure(), CLGenerateProposalsLayer::configure(), CpuGemmAssemblyDispatch::configure(), NEQLSTMLayer::configure(), CpuComplexMulKernel::configure(), CLQLSTMLayer::configure(), arm_compute::graph::backends::detail::create_detection_output_layer< CPPDetectionOutputLayer, CLTargetInfo >(), arm_compute::graph::backends::detail::create_detection_post_process_layer< CPPDetectionPostProcessLayer, CLTargetInfo >(), Accessor::data_type(), SubTensorInfo::data_type(), arm_compute::error_on_mismatching_quantization_info(), ClTemplateCast::get_component_code(), ClTemplateResize::get_component_code(), ClTemplateCast::get_config_id(), ClTemplateLogits1DNorm::get_config_id(), ClTemplateLogits1DMaxShiftExpSum::get_config_id(), ClTemplateReshape::get_config_id(), ClTemplateDepthwiseConv2d::get_config_id(), ClTemplateDirectConv2d::get_config_id(), ClTemplatePool2d::get_config_id(), ClTemplateActivation::get_config_id(), CLDeconvolutionLayer::get_deconvolution_method(), ClTemplateCast::get_name(), GpuCkwElementwiseBinary::get_name(), ClTemplateStore::get_tag_lut(), ClTemplateCast::get_tag_lut(), ClTemplateLogits1DNorm::get_tag_lut(), ClTemplateReshape::get_tag_lut(), ClTemplateLogits1DMaxShiftExpSum::get_tag_lut(), ClTemplateDepthwiseConv2d::get_tag_lut(), ClTemplateDirectConv2d::get_tag_lut(), ClTemplateResize::get_tag_lut(), ClTemplateActivation::get_tag_lut(), ClTemplatePool2d::get_tag_lut(), GpuCkwElementwiseBinary::get_tuner_id(), GpuCkwPool2d::get_window(), ClTemplatePool2d::get_window(), CpuGemmAssemblyDispatch::has_opt_impl(), GpuMul::is_supported_op(), GpuAdd::is_supported_op(), GpuSub::is_supported_op(), arm_compute::cpu::l2_normalize_x(), arm_compute::cpu::l2_normalize_yz(), arm_compute::cpu::matrix_matrix_multiply_f32(), CPPUpsampleKernel::run(), CpuAddMulAdd::run(), NEROIPoolingLayerKernel::run(), CPPTopKVKernel::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run(), NEFillBorderKernel::run(), CLReductionOperationKernel::run(), CPPDetectionPostProcessLayer::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), NELSTMLayer::run(), arm_compute::cpu::run_depthwise_quanitized8bit(), ClMatMulNativeKernel::run_op(), CpuCastKernel::run_op(), SubTensorInfo::set_tensor_shape(), CpuAddMulAdd::validate(), NESelectKernel::validate(), CpuMatMul::validate(), CpuDepthwiseConv2dAssemblyWrapperKernel::validate(), NEReductionOperation::validate(), NEDetectionPostProcessLayer::validate(), ClGemm::validate(), ClGemmLowpMatrixMultiplyCore::validate(), CLArgMinMaxLayer::validate(), CpuGemm::validate(), CLReductionOperation::validate(), ClGemmConv2d::validate(), NEGenerateProposalsLayer::validate(), CLDepthwiseConvolutionLayer::validate(), CpuGemmLowpMatrixMultiplyCore::validate(), NEDeconvolutionLayer::validate(), CpuGemmAssemblyDispatch::validate(), CLGenerateProposalsLayer::validate(), CLDirectDeconvolutionLayer::validate(), ClSaturatedArithmeticKernel::validate(), arm_compute::validate(), GpuMul::validate_op(), GpuAdd::validate_op(), GpuSub::validate_op(), arm_compute::cpu::vector_matrix_multiply_f32(), GpuCkwElementwiseBinary::write_component_code(), GpuCkwCast::write_component_code(), GpuCkwPool2d::write_component_code(), GpuCkwDepthwiseConv2d::write_component_code(), GpuCkwMatMul::write_component_code(), and GpuCkwDirectConv2d::write_component_code().

◆ dimension() [1/2]

virtual size_t dimension ( DataLayoutDimension  dimension) const
pure virtual

Return the size of the requested data layout dimension.

Parameters
[in]dimensionDataLayoutDimension of the dimension
Returns
Dimension of the requested dimension

Implemented in TensorInfo, and SubTensorInfo.

◆ dimension() [2/2]

virtual size_t dimension ( size_t  index) const
pure virtual

Return the size of the requested dimension.

Parameters
[in]indexIndex of the dimension
Returns
Dimension of the requested dimension

Implemented in TensorInfo, and SubTensorInfo.

Referenced by NumPyAccessor::access_tensor(), arm_compute::cpu::compute_all_anchors(), arm_compute::cpu::compute_all_anchors_qasymm16(), arm_compute::misc::shape_calculator::compute_deconvolution_padding(), arm_compute::misc::shape_calculator::compute_interleaved_shape(), arm_compute::misc::shape_calculator::compute_lhs_reshaped_shape(), arm_compute::misc::shape_calculator::compute_mm_shape(), arm_compute::misc::shape_calculator::compute_reductionB_shape(), arm_compute::misc::shape_calculator::compute_rhs_reshaped_shape(), arm_compute::misc::shape_calculator::compute_roi_align_shape(), arm_compute::misc::shape_calculator::compute_weights_reshaped_shape(), ClTransposedConvolutionKernel::configure(), ClWidthConcatenate2TensorsKernel::configure(), CPPDetectionOutputLayer::configure(), ClWidthConcatenate4TensorsKernel::configure(), ClGemmLowpMatrixMultiplyNativeKernel::configure(), CpuDirectConv2dKernel::configure(), CPPTopKVKernel::configure(), NEComputeAllAnchorsKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), CLBitwiseKernel::configure(), CLMaxUnpoolingLayerKernel::configure(), ClIndirectConv2dAddressPrecalculationKernel::configure(), CLChannelShuffleLayerKernel::configure(), CLSelectKernel::configure(), ClIndirectConv2dKernel::configure(), CLComputeAllAnchorsKernel::configure(), CLSpaceToDepthLayerKernel::configure(), CPPBoxWithNonMaximaSuppressionLimitKernel::configure(), CLSpaceToBatchLayerKernel::configure(), CLTileKernel::configure(), CLGatherKernel::configure(), CPPNonMaximumSuppressionKernel::configure(), CPPDetectionPostProcessLayer::configure(), NEBoundingBoxTransformKernel::configure(), NEROIPoolingLayerKernel::configure(), ClGemmLowpMatrixMultiplyReshapedKernel::configure(), CLComparisonKernel::configure(), ClGemmLowpOffsetContributionKernel::configure(), ClGemmLowpOffsetContributionOutputStageKernel::configure(), CLComparison::configure(), CLBatchToSpaceLayerKernel::configure(), NEROIAlignLayerKernel::configure(), CLReverseKernel::configure(), CpuGemmMatrixMultiplyKernel::configure(), CLRangeKernel::configure(), ClDirectConv2dKernel::configure(), ClDirectConv3dKernel::configure(), ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel::configure(), NERNNLayer::configure(), CLPadLayerKernel::configure(), ClMulKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsKernel::configure(), NEScale::configure(), CLROIPoolingLayerKernel::configure(), CLPriorBoxLayerKernel::configure(), CLStackLayerKernel::configure(), ClGemmLowpMatrixAReductionKernel::configure(), ClGemmMatrixMultiplyReshapedKernel::configure(), CLDeconvolutionReshapeOutputKernel::configure(), CLRNNLayer::configure(), CLFuseBatchNormalizationKernel::configure(), CLDepthwiseConvolutionLayer::configure(), ClGemm::configure(), ClGemmLowpMatrixMultiplyCore::configure(), NEGenerateProposalsLayer::configure(), CpuGemmConv2d::configure(), ClGemmConv2d::configure(), CLCropResize::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), ClGemmLowpMatrixBReductionKernel::configure(), CLComparisonStatic< COP >::configure(), NEDeconvolutionLayer::configure(), CLGenerateProposalsLayer::configure(), CLGEMMDeconvolutionLayer::configure(), CLDirectDeconvolutionLayer::configure(), NEQLSTMLayer::configure(), CLQLSTMLayer::configure(), NECropKernel::configure_output_shape(), arm_compute::cpu::kernels::convolve_nchw(), arm_compute::cpu::kernels::convolve_nhwc(), ITensor::copy_from(), arm_compute::cpu::directconv3d_float_neon_ndhwc(), arm_compute::cpu::directconv3d_quantized_neon_ndhwc(), ClTemplateCast::get_build_options(), ClTemplateLogits1DNorm::get_build_options(), ClTemplateReshape::get_build_options(), ClTemplateLogits1DMaxShiftExpSum::get_build_options(), ClTemplateDepthwiseConv2d::get_build_options(), ClTemplateDirectConv2d::get_build_options(), ClTemplateResize::get_build_options(), ClTemplatePool2d::get_build_options(), ClTemplateActivation::get_build_options(), ClTemplateLogits1DMaxShiftExpSum::get_component_code(), ClTemplateDepthwiseConv2d::get_component_code(), ClTemplateDirectConv2d::get_component_code(), ClTemplateCast::get_config_id(), ClTemplateLogits1DNorm::get_config_id(), ClTemplateLogits1DMaxShiftExpSum::get_config_id(), ClTemplateReshape::get_config_id(), ClTemplateDepthwiseConv2d::get_config_id(), ClTemplateDirectConv2d::get_config_id(), ClTemplateResize::get_config_id(), ClTemplatePool2d::get_config_id(), ClTemplateActivation::get_config_id(), ClConv2d::get_convolution_method(), CpuConv2d::get_convolution_method(), CLDeconvolutionLayer::get_deconvolution_method(), GpuCkwMatMul::get_name(), ClTemplateLogits1DMaxShiftExpSum::get_tag_lut(), ClTemplateDepthwiseConv2d::get_tag_lut(), ClTemplateDirectConv2d::get_tag_lut(), ClTemplateResize::get_tag_lut(), ClTemplatePool2d::get_tag_lut(), GpuCkwElementwiseBinary::get_tuner_id(), GpuCkwResize::get_tuner_id(), GpuCkwActivation::get_window(), GpuCkwCast::get_window(), GpuCkwElementwiseBinary::get_window(), GpuCkwResize::get_window(), GpuCkwPool2d::get_window(), GpuCkwMatMul::get_window(), ClTemplateCast::get_window(), ClTemplateLogits1DNorm::get_window(), ClTemplateLogits1DMaxShiftExpSum::get_window(), ClTemplateReshape::get_window(), ClTemplateResize::get_window(), ClTemplatePool2d::get_window(), ClTemplateActivation::get_window(), CpuGemmConv2d::has_opt_impl(), arm_compute::cpu::in_bounds_crop_window(), arm_compute::cpu::instance_normalization_nchw(), arm_compute::cpu::matrix_matrix_multiply_f32(), arm_compute::cpu::roi_align(), CPPUpsampleKernel::run(), NEROIPoolingLayerKernel::run(), NETileKernel::run(), NEDepthToSpaceLayerKernel::run(), NESpaceToDepthLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLInstanceNormalizationLayerKernel::run(), CLQLSTMLayerNormalizationKernel::run(), NEFFTRadixStageKernel::run(), CLROIPoolingLayerKernel::run(), CLMeanStdDevNormalizationKernel::run(), CLReductionOperationKernel::run(), CLArgMinMaxLayerKernel::run(), CLPriorBoxLayerKernel::run(), NECropKernel::run(), NEBatchToSpaceLayerKernel::run(), CLROIAlignLayerKernel::run(), NESpaceToBatchLayerKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), CLComputeMeanVariance::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), ClMatMulNativeKernel::run_op(), arm_compute::run_reverse(), CLDeconvolutionLayerUpsampleKernel::validate(), CpuMatMul::validate(), CpuDepthwiseConv2dAssemblyWrapperKernel::validate(), CpuGemmDirectConv2d::validate(), CPPDetectionPostProcessLayer::validate(), CpuDirectConv2d::validate(), NERNNLayer::validate(), CLROIPoolingLayerKernel::validate(), CpuFullyConnected::validate(), ClFullyConnected::validate(), ClGemm::validate(), ClGemmLowpMatrixMultiplyCore::validate(), CLRNNLayer::validate(), CpuGemm::validate(), CpuGemmConv2d::validate(), ClGemmConv2d::validate(), NEGenerateProposalsLayer::validate(), CLDepthwiseConvolutionLayer::validate(), CpuGemmLowpMatrixMultiplyCore::validate(), NEDeconvolutionLayer::validate(), CLGEMMDeconvolutionLayer::validate(), CLGenerateProposalsLayer::validate(), CLDirectDeconvolutionLayer::validate(), NELSTMLayer::validate(), NEQLSTMLayer::validate(), CLLSTMLayer::validate(), CLQLSTMLayer::validate(), arm_compute::cpu::kernels::validate_arguments(), arm_compute::cpu::vector_matrix_multiply_f32(), GpuCkwElementwiseBinary::write_component_code(), GpuCkwPool2d::write_component_code(), GpuCkwDepthwiseConv2d::write_component_code(), GpuCkwDirectConv2d::write_component_code(), and GpuCkwMatMul::write_component_code().

◆ element_size()

virtual size_t element_size ( ) const
pure virtual

Element size in bytes calculated as data_size() * num_channels()

Returns
The size of one element in bytes

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::calculate_squashed_or_max_window(), ClTransposedConvolutionKernel::configure(), ClWidthConcatenate2TensorsKernel::configure(), ClWidthConcatenate4TensorsKernel::configure(), CLBitwiseKernel::configure(), CLSelectKernel::configure(), NEPadLayerKernel::configure(), CLComparisonKernel::configure(), CLRangeKernel::configure(), ClMulKernel::configure(), ITensor::copy_from(), Accessor::element_size(), SubTensorInfo::element_size(), arm_compute::cpu::fused_batch_normalization_conv(), arm_compute::cpu::fused_batch_normalization_dwc_nchw(), arm_compute::cpu::fused_batch_normalization_dwc_nhwc(), GpuCkwActivation::get_window(), GpuCkwCast::get_window(), GpuCkwElementwiseBinary::get_window(), GpuCkwResize::get_window(), ClTemplateCast::get_window(), ClTemplateReshape::get_window(), ClTemplateResize::get_window(), ClTemplateActivation::get_window(), arm_compute::cpu::in_bounds_crop_window(), CpuWinogradConv2d::prepare(), NEQLSTMLayer::prepare(), CPPUpsampleKernel::run(), NETileKernel::run(), NEDepthToSpaceLayerKernel::run(), NESpaceToDepthLayerKernel::run(), NEReverseKernel::run(), NEReorgLayerKernel::run(), NEBatchToSpaceLayerKernel::run(), NESpaceToBatchLayerKernel::run(), NELSTMLayer::run(), CpuWinogradConv2dTransformInputKernel::run_op(), CpuWinogradConv2dTransformOutputKernel::run_op(), arm_compute::cpu::select_op_not_same_rank(), and CpuGemmAssemblyDispatch::validate().

◆ extend_padding()

virtual bool extend_padding ( const PaddingSize padding)
pure virtual

Update the offset to the first element, the strides and the total size.

Note
This function can only increase the offset, strides and total size.
Parameters
[in]paddingPadding around the XY plane in number of elements.
Returns
True if the strides, offset and total size have changed.

Implemented in TensorInfo, and SubTensorInfo.

Referenced by ClIndirectConv2dKernel::configure(), SubTensorInfo::extend_padding(), AccessWindowStatic::update_padding_if_needed(), and AccessWindowRectangle::update_padding_if_needed().

◆ format()

virtual Format format ( ) const
pure virtual

Colour format of the image.

Returns
Colour format of the image

Implemented in TensorInfo, and SubTensorInfo.

Referenced by Accessor::format(), SubTensorInfo::format(), and SubTensorInfo::set_tensor_shape().

◆ get_dynamic_state_value()

static constexpr int32_t get_dynamic_state_value ( )
inlinestaticconstexpr

Get the value representing dynamic dimension state.

Returns
Value representing dynamic dimension state

Definition at line 58 of file ITensorInfo.h.

59  {
60  return _dynamic_dimension;
61  }

Referenced by arm_compute::test::construct_dynamic_dims_state(), and TensorInfo::is_dynamic().

◆ get_static_state_value()

static constexpr int32_t get_static_state_value ( )
inlinestaticconstexpr

Get the value representing static dimension state.

Returns
Value representing static dimension state

Definition at line 67 of file ITensorInfo.h.

68  {
69  return _static_dimension;
70  }

Referenced by arm_compute::test::construct_static_dims_state().

◆ has_padding()

virtual bool has_padding ( ) const
pure virtual

Checks if the tensor has been allocated with padding or not.

Returns
True if padding is allocated in the tensor, otherwise false.

Implemented in TensorInfo, and SubTensorInfo.

Referenced by NEPadLayerKernel::configure(), SubTensorInfo::has_padding(), NECropKernel::run(), and NECropKernel::validate().

◆ has_valid_id()

◆ id()

virtual Id id ( ) const
pure virtual

Get the workload tensor id of the tensor.

Returns
Workload tensor id of the tensor

Implemented in TensorInfo, and SubTensorInfo.

Referenced by ITensorInfo::has_valid_id(), and SubTensorInfo::id().

◆ is_dynamic()

virtual bool is_dynamic ( ) const
pure virtual

Flag indicating whether the shape of the tensor is dynamic, meaning that it can change on kernel/function execution.

Returns
True if its dynamic else false

Implemented in TensorInfo, and SubTensorInfo.

Referenced by SubTensorInfo::is_dynamic().

◆ is_resizable()

◆ lock_paddings()

virtual bool lock_paddings ( ) const
pure virtual

Get the lock paddings flag value.

Returns
lock paddings flag value

Implemented in TensorInfo, and SubTensorInfo.

Referenced by ClMatMulNativeDefaultConfigValhall::configure(), and ClMatMulNativeKernel::configure().

◆ num_channels()

virtual size_t num_channels ( ) const
pure virtual

◆ num_dimensions()

virtual size_t num_dimensions ( ) const
pure virtual

The number of dimensions of the tensor (rank)

Returns
The number of dimensions of the tensor (rank)

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::calculate_squashed_or_max_window(), arm_compute::misc::shape_calculator::compute_mm_shape(), arm_compute::misc::shape_calculator::compute_stack_shape(), AccessWindowStatic::compute_valid_region(), AccessWindowRectangle::compute_valid_region(), arm_compute::misc::shape_calculator::compute_weights_reshaped_shape(), CPPDetectionOutputLayer::configure(), CLStridedSliceKernel::configure(), ClGemmLowpMatrixMultiplyNativeKernel::configure(), ClGemmMatrixMultiplyNativeKernel::configure(), CPPUpsampleKernel::configure(), CPPPermuteKernel::configure(), NEPadLayerKernel::configure(), CLGatherKernel::configure(), ClGemmLowpMatrixMultiplyReshapedKernel::configure(), ClGemmLowpOffsetContributionKernel::configure(), ClGemmLowpOffsetContributionOutputStageKernel::configure(), NEReduceMean::configure(), ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel::configure(), ClGemmMatrixMultiplyReshapedOnlyRhsKernel::configure(), CLReduceMean::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), ClGemmMatrixMultiplyReshapedKernel::configure(), ITensor::copy_from(), arm_compute::cpu::matrix_matrix_multiply_f32(), CpuReshapeKernel::prepare(), CpuGemmLowpOffsetContributionKernel::run_op(), AccessWindowStatic::update_window_if_needed(), AccessWindowRectangle::update_window_if_needed(), NEQLSTMLayerNormalizationKernel::validate(), CpuGemmDirectConv2d::validate(), NECropKernel::validate(), CLROIPoolingLayerKernel::validate(), CpuFullyConnected::validate(), ClFullyConnected::validate(), ClGemmConv2d::validate(), CpuGemmConv2d::validate(), NEGenerateProposalsLayer::validate(), NELSTMLayerQuantized::validate(), CLGenerateProposalsLayer::validate(), NELSTMLayer::validate(), CLLSTMLayerQuantized::validate(), NEQLSTMLayer::validate(), CLLSTMLayer::validate(), CLQLSTMLayer::validate(), arm_compute::cpu::kernels::validate_arguments(), and arm_compute::cpu::vector_matrix_multiply_f32().

◆ offset_element_in_bytes()

virtual int32_t offset_element_in_bytes ( const Coordinates pos) const
pure virtual

The offset in bytes from the beginning of the memory allocation to access the element at position (x, y, z ...)

Parameters
[in]posVector with the coordinates of the element to access. The size of this vector must be equal to the number of dimensions of the tensor
Returns
Offset in bytes from the beginning of the memory allocation to access the element (x, y, z, ...)

Implemented in TensorInfo, and SubTensorInfo.

Referenced by SubTensorInfo::offset_first_element_in_bytes(), ITensor::ptr_to_element(), and NEReorgLayerKernel::run().

◆ offset_first_element_in_bytes()

◆ padding()

◆ quantization_info()

virtual QuantizationInfo quantization_info ( ) const
pure virtual

Get the quantization settings (scale and offset) of the tensor.

Returns
A QuantizationInfo containing the scale and offset.

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::cpu::add_qasymm8_signed_sve2(), arm_compute::cpu::add_qasymm8_sve2(), arm_compute::cpu::add_qsymm16_neon(), arm_compute::cpu::add_qsymm16_sve2(), arm_compute::cpu::add_sub_q8_neon_fixedpoint_possible(), arm_compute::cpu::add_sub_qasymm8_neon(), arm_compute::cpu::add_sub_qasymm8_signed_neon(), arm_compute::auto_init_if_empty(), arm_compute::cpu::avg_poolingMxNxD_q8_neon_ndhwc(), arm_compute::cpu::bounding_box_transform_qsymm16(), arm_compute::cpu::compute_all_anchors_qasymm16(), arm_compute::quantization::compute_quantized_multipliers_and_shifts(), ClTransposedConvolutionKernel::configure(), ClMatMulLowpNativeMMULKernel::configure(), ClWidthConcatenate2TensorsKernel::configure(), ClWidthConcatenate4TensorsKernel::configure(), ClMatMulLowpNativeKernel::configure(), NEComputeAllAnchorsKernel::configure(), NEQLSTMLayerNormalizationKernel::configure(), CLComputeAllAnchorsKernel::configure(), NERangeKernel::configure(), CLQLSTMLayerNormalizationKernel::configure(), NEROIPoolingLayerKernel::configure(), NEBoundingBoxTransformKernel::configure(), CLComparisonKernel::configure(), CLRangeKernel::configure(), NEReduceMean::configure(), ClDirectConv2dKernel::configure(), ClDirectConv3dKernel::configure(), ClMulKernel::configure(), CLReduceMean::configure(), CLBoundingBoxTransformKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), CLROIPoolingLayerKernel::configure(), CLROIAlignLayerKernel::configure(), CLDeconvolutionLayerUpsample::configure(), CLDepthwiseConvolutionLayer::configure(), ClGemmLowpMatrixMultiplyCore::configure(), NEGenerateProposalsLayer::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), CLGenerateProposalsLayer::configure(), CLGEMMDeconvolutionLayer::configure(), NEQLSTMLayer::configure(), CLQLSTMLayer::configure(), arm_compute::cpu::directconv3d_quantized_neon_ndhwc(), arm_compute::cpu::elementwise_arithmetic_quantized_op(), arm_compute::cpu::elementwise_comp_quantized_signed(), arm_compute::cpu::elementwise_comparison_quantized_op(), arm_compute::cpu::elementwise_op< int8_t >(), arm_compute::cpu::elementwise_op< uint8_t >(), arm_compute::cpu::elementwise_op_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), arm_compute::error_on_mismatching_quantization_info(), arm_compute::cpu::max_poolingMxNxD_q8_neon_ndhwc(), arm_compute::cpu::neon_qasymm8_meanstddevnorm(), arm_compute::cpu::neon_softmax_logits_1d_quantized(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), Accessor::quantization_info(), SubTensorInfo::quantization_info(), arm_compute::cpu::roi_align(), CPPUpsampleKernel::run(), CPPDetectionPostProcessLayer::run(), arm_compute::cpu::run_depthwise_quanitized8bit(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sve2_softmax_logits_1d_quantized(), arm_compute::helpers::tensor_info::tensors_have_different_quantization_info(), CpuDepthwiseConv2dAssemblyWrapperKernel::validate(), ClGemmLowpMatrixMultiplyCore::validate(), NEGenerateProposalsLayer::validate(), CpuGemmLowpMatrixMultiplyCore::validate(), CLGenerateProposalsLayer::validate(), NEQLSTMLayer::validate(), arm_compute::validate(), and CLQLSTMLayer::validate().

◆ reset_padding()

virtual ITensorInfo& reset_padding ( )
pure virtual

Resets the padding settings of the tensor.

Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

Referenced by CpuLogits1DSoftmaxKernel< IS_LOG >::configure(), and SubTensorInfo::reset_padding().

◆ set_are_values_constant()

virtual ITensorInfo& set_are_values_constant ( bool  are_values_constant)
pure virtual

Set the flag whether the tensor values can change during kernel/function execution.

Parameters
[in]are_values_constantFlag that marks the tensor values if they can be changed or not.
Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::auto_init_if_empty(), and SubTensorInfo::set_are_values_constant().

◆ set_data_layout()

virtual ITensorInfo& set_data_layout ( const DataLayout data_layout)
pure virtual

Set the data layout of the tensor.

Parameters
[in]data_layoutDataLayout containing the layout data information.
Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::auto_init_if_empty(), NEROIAlignLayerKernel::configure(), NEInstanceNormalizationLayer::configure(), CLROIAlignLayerKernel::configure(), NEFFTConvolutionLayer::configure(), CpuGemmConv2d::configure(), ClGemmConv2d::configure(), and SubTensorInfo::set_data_layout().

◆ set_data_type()

virtual ITensorInfo& set_data_type ( DataType  data_type)
pure virtual

Set the data type to the specified value.

Warning
This resets the format to UNKNOWN.
Parameters
[in]data_typeThe new data type.
Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::auto_init_if_empty(), main(), SubTensorInfo::set_data_type(), and arm_compute::graph::backends::detail::validate_convolution_layer().

◆ set_format()

virtual ITensorInfo& set_format ( Format  format)
pure virtual

Set the format of an already initialized tensor.

Note
If the data type has already been configured (i.e. not UNKNOWN) it must match the new format. If data type hasn't been configured it will be based on the format.
Parameters
[in]formatSingle-plane format of the tensor.
Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

Referenced by SubTensorInfo::set_format().

◆ set_id()

virtual ITensorInfo& set_id ( ITensorInfo::Id  id)
pure virtual

Set the tensor id.

Implemented in TensorInfo, and SubTensorInfo.

Referenced by SubTensorInfo::set_id().

◆ set_is_resizable()

virtual ITensorInfo& set_is_resizable ( bool  is_resizable)
pure virtual

Set the flag whether the tensor size can be changed.

Parameters
[in]is_resizableFlag that marks the tensor if it can be changed or not.
Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

Referenced by CpuGemmConv2d::configure(), and SubTensorInfo::set_is_resizable().

◆ set_lock_paddings()

virtual ITensorInfo& set_lock_paddings ( bool  flag)
pure virtual

Set the lock paddings flag of the tensor.

It should be set to True, when the tensor could be mapped to camera or frame buffer.

Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

◆ set_num_channels()

virtual ITensorInfo& set_num_channels ( int  num_channels)
pure virtual

Set the number of channels to the specified value.

Warning
This resets the format to UNKNOWN.
Parameters
[in]num_channelsNew number of channels.
Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::auto_init_if_empty(), main(), SubTensorInfo::set_num_channels(), NEReductionOperation::validate(), CLArgMinMaxLayer::validate(), and CLReductionOperation::validate().

◆ set_quantization_info()

◆ set_tensor_dims_state()

virtual ITensorInfo& set_tensor_dims_state ( const TensorDimsState state)
pure virtual

Set the state for each dimension of the tensor.

This sets the state of each dimension of the shape in terms of dynamic behavior using -1 where appropriate. The index in the state is a 1 to 1 mapping with the shape dimension index. For example if you want to express [?, 3, 3] as a dynamic input then [-1, 3, 3] has to be set as a state

Parameters
[in]stateTensor dimensions state
Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

◆ set_tensor_shape()

virtual ITensorInfo& set_tensor_shape ( const TensorShape shape)
pure virtual

Set the shape of an already initialized tensor.

Warning
Changing the shape requires to recompute the strides and is therefore only possible if the tensor hasn't been allocated yet.
Parameters
[in]shapeNew tensor shape.
Returns
Reference to this ITensorInfo object

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::auto_init_if_empty(), NEQLSTMLayer::configure(), NECropKernel::configure_output_shape(), CpuMatMul::run(), SubTensorInfo::set_tensor_shape(), NEReductionOperation::validate(), CLArgMinMaxLayer::validate(), and CLReductionOperation::validate().

◆ set_valid_region()

◆ strides_in_bytes()

◆ tensor_dims_state()

virtual const TensorDimsState& tensor_dims_state ( ) const
pure virtual

State of each dimension of the tensor shape.

Returns
A vector with the state for each dimension of the tensor, where -1 specifies dynamic dimension

Implemented in TensorInfo, and SubTensorInfo.

◆ tensor_shape()

virtual const TensorShape& tensor_shape ( ) const
pure virtual

Size for each dimension of the tensor.

Returns
A vector with the size for each dimension of the tensor

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::cpu::add_qasymm8_signed_sve2(), arm_compute::cpu::add_qasymm8_sve2(), arm_compute::cpu::add_qsymm16_neon(), arm_compute::cpu::add_qsymm16_sve2(), arm_compute::cpu::add_same_neon(), arm_compute::cpu::add_same_sve(), arm_compute::cpu::add_sub_q8_neon_fixedpoint(), arm_compute::cpu::add_sub_qasymm8_neon(), arm_compute::cpu::add_sub_qasymm8_signed_neon(), arm_compute::auto_init_if_empty(), arm_compute::cpu::bounding_box_transform(), arm_compute::cpu::bounding_box_transform_qsymm16(), arm_compute::calculate_squashed_or_max_window(), arm_compute::utils::compare_tensor(), arm_compute::misc::shape_calculator::compute_deconvolution_output_shape(), arm_compute::misc::shape_calculator::compute_deep_convolution_shape(), arm_compute::misc::shape_calculator::compute_depthwise_convolution_shape(), arm_compute::misc::shape_calculator::compute_interleaved_shape(), arm_compute::misc::shape_calculator::compute_lhs_reshaped_shape(), arm_compute::misc::shape_calculator::compute_mm_shape(), arm_compute::misc::shape_calculator::compute_reductionB_shape(), arm_compute::misc::shape_calculator::compute_rhs_reshaped_shape(), arm_compute::misc::shape_calculator::compute_stack_shape(), AccessWindowAutoPadding::compute_valid_region(), AccessWindowStatic::compute_valid_region(), arm_compute::misc::shape_calculator::compute_weights_reshaped_shape(), ClMatMulNativeDefaultConfigValhall::configure(), NELogicalKernel::configure(), ClMatMulLowpNativeMMULKernel::configure(), CPPDetectionOutputLayer::configure(), ClMatMulNativeKernel::configure(), CLStridedSliceKernel::configure(), ClMatMulLowpNativeKernel::configure(), CpuGemmLowpMatrixMultiplyKernel::configure(), CPPTopKVKernel::configure(), CPPUpsampleKernel::configure(), NEBitwiseXorKernel::configure(), CPPPermuteKernel::configure(), ClIndirectConv2dAddressPrecalculationKernel::configure(), NEBitwiseAndKernel::configure(), NEBitwiseOrKernel::configure(), CLSelectKernel::configure(), ClIndirectConv2dKernel::configure(), CpuSubKernel::configure(), CpuGemmLowpOffsetContributionKernel::configure(), CpuAddMulAddKernel::configure(), CpuDirectConv3dKernel::configure(), NESelectKernel::configure(), ClGemmLowpOffsetContributionKernel::configure(), ClGemmLowpOffsetContributionOutputStageKernel::configure(), CpuAddKernel::configure(), NEGatherKernel::configure(), CpuGemmMatrixMultiplyKernel::configure(), CpuMulKernel::configure(), NEReduceMean::configure(), CpuSoftmaxGeneric< IS_LOG >::configure(), ClGemmLowpMatrixMultiplyReshapedOnlyRhsKernel::configure(), NESpaceToBatchLayer::configure(), ClMatMulNativeMMULKernel::configure(), ClMulKernel::configure(), CLReduceMean::configure(), NECropResize::configure(), CLSpaceToBatchLayer::configure(), CpuGemmLowpOffsetContributionOutputStageKernel::configure(), NEFFTConvolutionLayer::configure(), ClWinogradConv2d::configure(), NEGenerateProposalsLayer::configure(), NELSTMLayerQuantized::configure(), CLCropResize::configure(), NELSTMLayer::configure(), ClComplexMulKernel::configure(), CLFFTConvolutionLayer::configure(), NEQLSTMLayer::configure(), CLLSTMLayerQuantized::configure(), CpuComplexMulKernel::configure(), CLLSTMLayer::configure(), CLQLSTMLayer::configure(), NECropKernel::configure_output_shape(), ITensor::copy_from(), arm_compute::graph::backends::detail::create_detection_output_layer< CPPDetectionOutputLayer, CLTargetInfo >(), arm_compute::graph::backends::detail::create_detection_post_process_layer< CPPDetectionPostProcessLayer, CLTargetInfo >(), arm_compute::graph::backends::detail::create_normalization_layer< NENormalizationLayer, NETargetInfo >(), arm_compute::cpu::elementwise_arithmetic_op(), arm_compute::cpu::elementwise_arithmetic_quantized_op(), arm_compute::cpu::elementwise_comp_quantized_signed(), arm_compute::cpu::elementwise_comparison_op(), arm_compute::cpu::elementwise_comparison_quantized_op(), arm_compute::cpu::elementwise_op(), arm_compute::cpu::elementwise_op_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), SubTensorInfo::extend_padding(), arm_compute::misc::shape_calculator::extract_shape(), CLDeconvolutionLayer::get_deconvolution_method(), GpuCkwMatMul::get_name(), GpuCkwActivation::get_window(), GpuCkwCast::get_window(), GpuCkwElementwiseBinary::get_window(), GpuCkwResize::get_window(), GpuCkwPool2d::get_window(), GpuCkwDepthwiseConv2d::get_window(), GpuCkwMatMul::get_window(), ClTemplateCast::get_window(), ClTemplateLogits1DNorm::get_window(), ClTemplateLogits1DMaxShiftExpSum::get_window(), ClTemplateReshape::get_window(), ClTemplateDepthwiseConv2d::get_window(), ClTemplateDirectConv2d::get_window(), ClTemplateResize::get_window(), ClTemplatePool2d::get_window(), ClTemplateActivation::get_window(), Accessor::num_elements(), CpuReshapeKernel::prepare(), CpuDepthwiseConv2dAssemblyDispatch::prepare(), NETileKernel::run(), NEReorgLayerKernel::run(), CLQLSTMLayerNormalizationKernel::run(), CLComparisonKernel::run(), CLStackLayerKernel::run(), ClMatMulNativeKernel::run_op(), SubTensorInfo::set_tensor_shape(), SubTensorInfo::set_valid_region(), Accessor::shape(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), AccessWindowStatic::update_padding_if_needed(), AccessWindowStatic::update_window_if_needed(), AccessWindowRectangle::update_window_if_needed(), arm_compute::cl_dwc::use_cl_image_for_weights(), NELogicalKernel::validate(), ClMatMulLowpNativeMMULKernel::validate(), ClMatMulNativeKernel::validate(), ClMatMulLowpNativeKernel::validate(), NEQLSTMLayerNormalizationKernel::validate(), NESelectKernel::validate(), CpuDepthwiseConv2dAssemblyWrapperKernel::validate(), CpuGemmDirectConv2d::validate(), ClMatMulNativeMMULKernel::validate(), NECropKernel::validate(), ClComponentLogits1DNorm::validate(), ClIndirectConv2d::validate(), ClComponentLogits1DMaxShiftExpSum::validate(), NERNNLayer::validate(), NEPadLayer::validate(), NECropResize::validate(), CLRNNLayer::validate(), ClGemmConv2d::validate(), CpuGemmConv2d::validate(), CLDepthwiseConvolutionLayer::validate(), NEFFTConvolutionLayer::validate(), CpuGemmLowpMatrixMultiplyCore::validate(), CLCropResize::validate(), NEDeconvolutionLayer::validate(), NELSTMLayerQuantized::validate(), CLFFTConvolutionLayer::validate(), CLGEMMDeconvolutionLayer::validate(), CLLSTMLayerQuantized::validate(), arm_compute::opencl::kernels::gemm::validate_image2d_support_on_rhs(), GpuCkwPool2d::write_component_code(), GpuCkwDepthwiseConv2d::write_component_code(), and GpuCkwMatMul::write_component_code().

◆ total_size()

◆ valid_region()

virtual ValidRegion valid_region ( ) const
pure virtual

Valid region of the tensor.

All elements in the valid region have defined values, i.e. are not undefined.

Returns
The valid region.

Implemented in TensorInfo, and SubTensorInfo.

Referenced by arm_compute::cpu::neon_softmax_logits_1d_float(), arm_compute::cpu::neon_softmax_logits_1d_quantized(), SubTensorInfo::set_valid_region(), arm_compute::cpu::sve2_softmax_logits_1d_quantized(), and arm_compute::cpu::sve_softmax_logits_1d_float().

Field Documentation

◆ invalid_tensor_id


The documentation for this class was generated from the following file:
arm_compute::ITensorInfo::id
virtual Id id() const =0
Get the workload tensor id of the tensor.
arm_compute::ITensorInfo::invalid_tensor_id
static constexpr Id invalid_tensor_id
An invalid tensor id within a domain.
Definition: ITensorInfo.h:52
arm_compute::TensorShape::broadcast_shape
static TensorShape broadcast_shape(const Shapes &...shapes)
If shapes are broadcast compatible, return the broadcasted shape.
Definition: TensorShape.h:214
arm_compute::test::validation::info
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
arm_compute::utility::for_each
void for_each(F &&)
Base case of for_each.
Definition: Utility.h:111