21.05
|
Interface for CPU tensor. More...
#include <ITensor.h>
Public Member Functions | |
virtual ITensorInfo * | info () const =0 |
Interface to be implemented by the child class to return the tensor's metadata. More... | |
virtual ITensorInfo * | info ()=0 |
Interface to be implemented by the child class to return the tensor's metadata. More... | |
virtual | ~ITensor ()=default |
Default virtual destructor. More... | |
virtual uint8_t * | buffer () const =0 |
Interface to be implemented by the child class to return a pointer to CPU memory. More... | |
uint8_t * | ptr_to_element (const Coordinates &id) const |
Return a pointer to the element at the passed coordinates. More... | |
void | copy_from (const ITensor &src) |
Copy the content of another tensor. More... | |
void | print (std::ostream &s, IOFormatInfo io_fmt=IOFormatInfo()) const |
Print a tensor to a given stream using user defined formatting information. More... | |
bool | is_used () const |
Flags if the tensor is used or not. More... | |
void | mark_as_unused () const |
Marks a tensor as unused. More... | |
|
virtualdefault |
Default virtual destructor.
|
pure virtual |
Interface to be implemented by the child class to return a pointer to CPU memory.
Implemented in ICLTensor, SubTensor, OperatorTensor, and Tensor.
Referenced by SubTensor::buffer(), Accessor::data(), arm_compute::utils::draw_detection_rectangle(), Iterator::Iterator(), ITensor::ptr_to_element(), CPPUpsampleKernel::run(), NEROIPoolingLayerKernel::run(), NEReorgLayerKernel::run(), NEGEMMConvolutionLayer::run(), CpuPoolingAssemblyWrapperKernel::run_op(), and arm_compute::run_reverse().
void copy_from | ( | const ITensor & | src | ) |
Copy the content of another tensor.
[in] | src | Source tensor to copy from. |
Definition at line 35 of file ITensor.cpp.
References ARM_COMPUTE_ERROR_ON, ITensorInfo::dimension(), TensorInfo::dimension(), Window::DimY, ITensorInfo::element_size(), TensorInfo::element_size(), arm_compute::execute_window_loop(), ITensor::info(), ITensorInfo::num_channels(), TensorInfo::num_channels(), ITensorInfo::num_dimensions(), TensorInfo::num_dimensions(), Iterator::ptr(), ITensorInfo::set_valid_region(), arm_compute::test::validation::src, arm_compute::test::validation::src_info, ITensorInfo::tensor_shape(), TensorInfo::tensor_shape(), Window::use_tensor_dimensions(), and TensorInfo::valid_region().
|
pure virtual |
Interface to be implemented by the child class to return the tensor's metadata.
Implemented in CLSubTensor, CLTensor, SubTensor, OperatorTensor, and Tensor.
Referenced by NumPyAccessor::access_tensor(), ImageAccessor::access_tensor(), ValidationInputAccessor::access_tensor(), ValidationOutputAccessor::access_tensor(), VerifyAccessor< D >::access_tensor(), DetectionOutputAccessor::access_tensor(), TopNPredictionsAccessor::access_tensor(), RandomAccessor::access_tensor(), arm_compute::cpu::add_qasymm8_neon(), arm_compute::cpu::add_qasymm8_signed_neon(), arm_compute::cpu::add_qsymm16_neon(), arm_compute::cpu::add_s16_u8_s16_neon(), arm_compute::cpu::add_same_neon(), ICLKernel::add_tensor_argument(), arm_compute::cpu::add_u8_u8_s16_neon(), CLComparisonKernel::border_size(), ICLTensor::clear(), arm_compute::utils::compare_tensor(), NEFlattenLayer::configure(), CPPDetectionOutputLayer::configure(), ICLSimpleKernel::configure(), NEBatchToSpaceLayerKernel::configure(), NEReverseKernel::configure(), NETileKernel::configure(), NEChannelShuffleLayerKernel::configure(), NEConvertQuantizedSignednessKernel::configure(), NEDepthToSpaceLayerKernel::configure(), CLFillBorderKernel::configure(), NEPriorBoxLayerKernel::configure(), NESpaceToDepthLayerKernel::configure(), NEComputeAllAnchorsKernel::configure(), NEInstanceNormalizationLayerKernel::configure(), NEReorgLayerKernel::configure(), CPPTopKVKernel::configure(), NEBitwiseNotKernel::configure(), CLInstanceNormalizationLayerKernel::configure(), CLMaxUnpoolingLayerKernel::configure(), CLMinMaxLayerKernel::configure(), NEFFTDigitReverseKernel::configure(), NEFFTScaleKernel::configure(), NEQLSTMLayerNormalizationKernel::configure(), NESpaceToBatchLayerKernel::configure(), CLBitwiseKernel::configure(), CPPUpsampleKernel::configure(), NEBitwiseAndKernel::configure(), NEBitwiseOrKernel::configure(), NEBitwiseXorKernel::configure(), CLChannelShuffleLayerKernel::configure(), CLReverseKernel::configure(), CLSelectKernel::configure(), NENormalizationLayerKernel::configure(), CPPPermuteKernel::configure(), CPPBoxWithNonMaximaSuppressionLimit::configure(), CLDepthToSpaceLayerKernel::configure(), CLBatchToSpaceLayerKernel::configure(), NEPadLayerKernel::configure(), CLSpaceToDepthLayerKernel::configure(), CLDeconvolutionLayerUpsampleKernel::configure(), CLComputeAllAnchorsKernel::configure(), NEMaxUnpoolingLayerKernel::configure(), NERangeKernel::configure(), NEBoundingBoxTransformKernel::configure(), NEFFTRadixStageKernel::configure(), CLNormalizationLayerKernel::configure(), NEReshapeLayer::configure(), CLQLSTMLayerNormalizationKernel::configure(), CLFFTScaleKernel::configure(), CLGatherKernel::configure(), NEMeanStdDevNormalizationKernel::configure(), CLSpaceToBatchLayerKernel::configure(), NEROIPoolingLayerKernel::configure(), CPPBoxWithNonMaximaSuppressionLimitKernel::configure(), NEFill::configure(), NEFillBorderKernel::configure(), NEMinMaxLayerKernel::configure(), CLTileKernel::configure(), NEStackLayerKernel::configure(), CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::configure(), CLComparisonKernel::configure(), CPPDetectionPostProcessLayer::configure(), NECopy::configure(), CLFFTDigitReverseKernel::configure(), NEGatherKernel::configure(), NETranspose::configure(), NEGEMMMatrixAdditionKernel::configure(), CLReorgLayerKernel::configure(), CLRemapKernel::configure(), NEReductionOperationKernel::configure(), NESelectKernel::configure(), CPPNonMaximumSuppressionKernel::configure(), CLFlattenLayer::configure(), CLMeanStdDevNormalizationKernel::configure(), NELogicalAnd::configure(), NEQuantizationLayer::configure(), NEFuseBatchNormalizationKernel::configure(), NEGEMMMatrixMultiplyKernel::configure(), CLComparison::configure(), NEBatchNormalizationLayerKernel::configure(), NECropKernel::configure(), CLNormalizePlanarYUVLayerKernel::configure(), CLRangeKernel::configure(), CLReductionOperationKernel::configure(), NEROIAlignLayerKernel::configure(), NEDequantizationLayer::configure(), NEGEMMLowpMatrixMultiplyKernel::configure(), CLPadLayerKernel::configure(), NEPermute::configure(), CLFFTRadixStageKernel::configure(), CLPriorBoxLayerKernel::configure(), CLReshapeLayer::configure(), NEFFT2D::configure(), CLL2NormalizeLayerKernel::configure(), NEPReluLayer::configure(), NEConvolutionLayerReshapeWeights::configure(), NEDepthConvertLayerKernel::configure(), NESoftmaxLayerGeneric< IS_LOG >::configure(), CLBoundingBoxTransformKernel::configure(), NEElementwiseMax::configure(), NERNNLayer::configure(), NESpaceToBatchLayer::configure(), NEGEMMLowpQuantizeDownInt32ScaleKernel::configure(), CLGEMMLowpMatrixMultiplyNativeKernel::configure(), NEScale::configure(), NEReduceMean::configure(), NEGEMMInterleave4x4Kernel::configure(), NEGEMMLowpOffsetContributionKernel::configure(), NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPointKernel::configure(), CLRsqrtLayer::configure(), CLReduceMean::configure(), CLROIPoolingLayerKernel::configure(), CLStackLayerKernel::configure(), CLDepthConvertLayerKernel::configure(), CLGEMMReshapeLHSMatrixKernel::configure(), NECropResize::configure(), CLDepthwiseConvolutionLayer3x3NHWCKernel::configure(), NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPointKernel::configure(), NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel::configure(), CLLogicalNot::configure(), NEFFT1D::configure(), CLArgMinMaxLayerKernel::configure(), NEReductionOperation::configure(), CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::configure(), CLGEMMLowpQuantizeDownInt32ScaleKernel::configure(), NECol2ImKernel::configure(), CLROIAlignLayerKernel::configure(), NEDetectionPostProcessLayer::configure(), NEPoolingLayer::configure(), CLDequantizationLayer::configure(), CLFFT2D::configure(), CLDeconvolutionReshapeOutputKernel::configure(), CLPoolingLayer::configure(), CLPReluLayer::configure(), NEDepthwiseConvolutionLayer::configure(), CLWinogradInputTransformKernel::configure(), CLDeconvolutionLayer::configure(), CLRNNLayer::configure(), CLBatchNormalizationLayerKernel::configure(), CLFuseBatchNormalizationKernel::configure(), CLCol2ImKernel::configure(), CLFFT1D::configure(), CLGEMMMatrixMultiplyNativeKernel::configure(), CLConvolutionLayerReshapeWeights::configure(), NEArithmeticSubtraction::configure(), NEPadLayer::configure(), CLWinogradFilterTransformKernel::configure(), NEWeightsReshapeKernel::configure(), CLDeconvolutionLayerUpsample::configure(), CLScale::configure(), CLSpaceToBatchLayer::configure(), CLDepthwiseConvolutionLayer3x3NCHWKernel::configure(), CLGEMMLowpMatrixMultiplyReshapedKernel::configure(), CLGEMMMatrixMultiplyKernel::configure(), CLQuantizationLayer::configure(), NEDirectConvolutionLayer::configure(), CLGEMMLowpOffsetContributionKernel::configure(), NEGEMMAssemblyDispatch::configure(), CLWinogradOutputTransformKernel::configure(), CLSoftmaxLayerGeneric< IS_LOG >::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), NEIm2ColKernel::configure(), NEGEMMConv2d::configure(), CLPadLayer::configure(), NEWinogradConvolutionLayer::configure(), CLReductionOperation::configure(), NEGEMMTranspose1xWKernel::configure(), CLGEMMLowpOffsetContributionOutputStageKernel::configure(), CLArgMinMaxLayer::configure(), NEGEMMLowpOffsetContributionOutputStageKernel::configure(), CLWeightsReshapeKernel::configure(), NEPixelWiseMultiplication::configure(), CLDirectConvolutionLayer::configure(), NEFFTConvolutionLayer::configure(), NEGenerateProposalsLayer::configure(), CLGEMMReshapeRHSMatrixKernel::configure(), CLIm2ColKernel::configure(), CLPixelWiseMultiplication::configure(), NEGEMM::configure(), CLDepthwiseConvolutionLayer::configure(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::configure(), CLCropResize::configure(), NEGEMMLowpMatrixAReductionKernel::configure(), NELSTMLayerQuantized::configure(), NELSTMLayer::configure(), CLGEMMLowpMatrixAReductionKernel::configure(), CLComputeMeanVariance::configure(), CLLogicalAnd::configure(), CLLogicalOr::configure(), CLWinogradConvolutionLayer::configure(), NESlice::configure(), CLArithmeticAddition::configure(), CLComparisonStatic< COP >::configure(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::configure(), NEDeconvolutionLayer::configure(), NEGEMMLowpMatrixMultiplyCore::configure(), CLFFTConvolutionLayer::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), NEStridedSlice::configure(), NELogicalOr::configure(), CLGenerateProposalsLayer::configure(), NEConvolutionLayer::configure(), CLGEMMDeconvolutionLayer::configure(), CLGEMMMatrixMultiplyReshapedKernel::configure(), CLSlice::configure(), NEQLSTMLayer::configure(), NEFullyConnectedLayer::configure(), CLDirectDeconvolutionLayer::configure(), CLLSTMLayerQuantized::configure(), CLExpLayer::configure(), NEElementwiseMin::configure(), CLConvolutionLayer::configure(), CLGEMMLowpMatrixBReductionKernel::configure(), NEComplexPixelWiseMultiplication::configure(), CLFullyConnectedLayer::configure(), CLComplexPixelWiseMultiplication::configure(), NEGEMMLowpMatrixBReductionKernel::configure(), NELogicalNot::configure(), CLLSTMLayer::configure(), CLGEMM::configure(), CLQLSTMLayer::configure(), CLNegLayer::configure(), NEElementwiseSquaredDiff::configure(), NEGEMMConvolutionLayer::configure(), CLArithmeticSubtraction::configure(), CLSinLayer::configure(), CLGEMMConvolutionLayer::configure(), NEElementwiseDivision::configure(), CLLogLayer::configure(), NEGEMMLowpOutputStage::configure(), CLArithmeticDivision::configure(), NEElementwisePower::configure(), CLAbsLayer::configure(), NEElementwiseComparison::configure(), CLElementwiseMax::configure(), CLRoundLayer::configure(), NEElementwiseComparisonStatic< op >::configure(), CLElementwiseMin::configure(), CLElementwiseSquaredDiff::configure(), CLElementwisePower::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 >(), Accessor::data_layout(), Accessor::data_type(), arm_compute::utils::draw_detection_rectangle(), Accessor::element_size(), arm_compute::cpu::elementwise_comp_quantized_signed(), arm_compute::cpu::elementwise_op(), arm_compute::cpu::elementwise_op_quantized(), arm_compute::cpu::elementwise_op_quantized_signed(), arm_compute::error_on_data_layout_not_in(), arm_compute::error_on_data_type_channel_not_in(), arm_compute::error_on_data_type_not_in(), arm_compute::error_on_mismatching_data_layouts(), arm_compute::error_on_mismatching_data_types(), arm_compute::error_on_mismatching_quantization_info(), arm_compute::error_on_mismatching_shapes(), arm_compute::error_on_tensor_not_2d(), arm_compute::error_on_unsupported_cpu_bf16(), arm_compute::error_on_unsupported_cpu_fp16(), arm_compute::error_on_unsupported_fp16(), Accessor::format(), arm_compute::graph::backends::detail::get_backing_tensor_info(), ITensorV2::get_size(), Iterator::Iterator(), arm_compute::cpu::neon_softmax_logits_1d_float(), arm_compute::cpu::neon_softmax_logits_1d_quantized(), Accessor::num_channels(), Accessor::num_elements(), get_tensor_info_t< ITensorInfo * >::operator()(), VerifyAccessor< D >::output_shape(), Accessor::padding(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), CaffePreproccessor::preprocess(), TFPreproccessor::preprocess(), ITensor::ptr_to_element(), Accessor::quantization_info(), CLMinMaxLayerKernel::reset(), NEMinMaxLayerKernel::reset(), CpuElementwiseBase::run(), CpuElementwiseUnary::run(), CPPUpsampleKernel::run(), NEROIPoolingLayerKernel::run(), CPPDetectionOutputLayer::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run(), NETileKernel::run(), NEDepthToSpaceLayerKernel::run(), NEChannelShuffleLayerKernel::run(), NESpaceToDepthLayerKernel::run(), NEReverseKernel::run(), NEComputeAllAnchorsKernel::run(), CPPTopKVKernel::run(), CLInstanceNormalizationLayerKernel::run(), NEReorgLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLQLSTMLayerNormalizationKernel::run(), CLROIPoolingLayerKernel::run(), CLComparisonKernel::run(), NEFillBorderKernel::run(), NEMinMaxLayerKernel::run(), CLMeanStdDevNormalizationKernel::run(), NEFFTRadixStageKernel::run(), NEGEMMLowpMatrixMultiplyKernel::run(), NEBoundingBoxTransformKernel::run(), NEStackLayerKernel::run(), NEGEMMMatrixMultiplyKernel::run(), CLReductionOperationKernel::run(), CLPriorBoxLayerKernel::run(), CPPDetectionPostProcessLayer::run(), NEDepthConvertLayerKernel::run(), NEBatchToSpaceLayerKernel::run(), NEROIAlignLayerKernel::run(), NECropKernel::run(), NEGEMMLowpOffsetContributionKernel::run(), NEBatchNormalizationLayerKernel::run(), CLStackLayerKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), CLArgMinMaxLayerKernel::run(), CLGEMMReshapeLHSMatrixKernel::run(), NESpaceToBatchLayerKernel::run(), CLCol2ImKernel::run(), CLDepthwiseConvolutionLayer3x3NHWCKernel::run(), CLROIAlignLayerKernel::run(), NEWeightsReshapeKernel::run(), CLWinogradInputTransformKernel::run(), CLWinogradFilterTransformKernel::run(), CLGEMMMatrixMultiplyKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLDepthwiseConvolutionLayer3x3NCHWKernel::run(), CLWeightsReshapeKernel::run(), CLWinogradOutputTransformKernel::run(), NEGEMMLowpOffsetContributionOutputStageKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), CLComputeMeanVariance::run(), CLIm2ColKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedKernel::run(), CLGEMM::run(), NEGEMMConvolutionLayer::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), CpuDirectConvolutionKernel::run_op(), CpuAddKernel::run_op(), CpuPoolingAssemblyWrapperKernel::run_op(), CpuSubKernel::run_op(), arm_compute::run_reverse(), Accessor::shape(), Accessor::size(), arm_compute::cpu::sub_qasymm8_neon(), arm_compute::cpu::sub_qasymm8_signed_neon(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), and arm_compute::cpu::sub_u8_u8_s16_neon().
|
pure virtual |
Interface to be implemented by the child class to return the tensor's metadata.
Implemented in CLSubTensor, CLTensor, SubTensor, OperatorTensor, and Tensor.
bool is_used | ( | ) | const |
Flags if the tensor is used or not.
Definition at line 163 of file ITensor.cpp.
Referenced by NEWinogradConvolutionLayer::prepare(), NEGEMM::prepare(), NEFFTConvolutionLayer::prepare(), NEDeconvolutionLayer::prepare(), NEGEMMLowpMatrixMultiplyCore::prepare(), CLGEMMLowpMatrixMultiplyCore::prepare(), CLWinogradConvolutionLayer::prepare(), CLFFTConvolutionLayer::prepare(), CLGEMMDeconvolutionLayer::prepare(), CLDirectDeconvolutionLayer::prepare(), NEFullyConnectedLayer::prepare(), CLFullyConnectedLayer::prepare(), NEGEMMConvolutionLayer::prepare(), CLGEMMConvolutionLayer::prepare(), NETensorHandle::release_if_unused(), and CLTensorHandle::release_if_unused().
void mark_as_unused | ( | ) | const |
Marks a tensor as unused.
Definition at line 168 of file ITensor.cpp.
Referenced by NEWinogradConvolutionLayer::prepare(), NEGEMMConv2d::prepare(), NEGEMM::prepare(), NEFFTConvolutionLayer::prepare(), NEDeconvolutionLayer::prepare(), NEGEMMLowpMatrixMultiplyCore::prepare(), CLGEMMLowpMatrixMultiplyCore::prepare(), CLWinogradConvolutionLayer::prepare(), CLFFTConvolutionLayer::prepare(), CLGEMMDeconvolutionLayer::prepare(), NELSTMLayerQuantized::prepare(), CLDirectDeconvolutionLayer::prepare(), NEFullyConnectedLayer::prepare(), CLLSTMLayerQuantized::prepare(), CLFullyConnectedLayer::prepare(), NEQLSTMLayer::prepare(), CLGEMM::prepare(), CLQLSTMLayer::prepare(), NEGEMMConvolutionLayer::prepare(), CLGEMMConvolutionLayer::prepare(), and IWeightsManager::run().
void print | ( | std::ostream & | s, |
IOFormatInfo | io_fmt = IOFormatInfo() |
||
) | const |
Print a tensor to a given stream using user defined formatting information.
s | Output stream |
io_fmt | Format information |
Referenced by main().
|
inline |
Return a pointer to the element at the passed coordinates.
[in] | id | Coordinates of the element |
Definition at line 63 of file ITensor.h.
References ITensor::buffer(), ITensor::info(), and ITensorInfo::offset_element_in_bytes().
Referenced by arm_compute::cpu::bilinear_neon_scale(), CLGEMMLowpMatrixMultiplyCore::configure(), NECropKernel::configure_output_shape(), arm_compute::cpu::nearest_neon_scale(), Accessor::operator()(), CLAccessor::operator()(), CPPDetectionOutputLayer::run(), NETileKernel::run(), NESpaceToDepthLayerKernel::run(), NEDepthToSpaceLayerKernel::run(), CPPNonMaximumSuppressionKernel::run(), CPPDetectionPostProcessLayer::run(), NEBatchToSpaceLayerKernel::run(), NECropKernel::run(), NESpaceToBatchLayerKernel::run(), NEWeightsReshapeKernel::run(), NECropResize::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), and arm_compute::run_reverse().