24.02.1
|
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... | |
void | mark_as_used () const |
Marks a tensor as used. 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 arm_compute::cpu::bounding_box_transform(), arm_compute::cpu::bounding_box_transform_qsymm16(), SubTensor::buffer(), CpuAuxTensorHandler::CpuAuxTensorHandler(), Accessor::data(), arm_compute::cpu::directconv3d_float_neon_ndhwc(), arm_compute::cpu::directconv3d_quantized_neon_ndhwc(), arm_compute::cpu::max_unpooling(), CpuDepthwiseConv2dAssemblyDispatch::prepare(), CpuWinogradConv2d::prepare(), ITensor::ptr_to_element(), arm_compute::cpu::roi_align(), CPPUpsampleKernel::run(), NEROIPoolingLayerKernel::run(), NEDepthToSpaceLayerKernel::run(), NEReorgLayerKernel::run(), CpuGemmConv2d::run(), CpuWinogradConv2dTransformInputKernel::run_op(), CpuPool2dAssemblyWrapperKernel::run_op(), CpuDepthwiseConv2dAssemblyWrapperKernel::run_op(), CpuWinogradConv2dTransformOutputKernel::run_op(), arm_compute::run_reverse(), and arm_compute::cpu::select_op_not_same_rank().
void copy_from | ( | const ITensor & | src | ) |
Copy the content of another tensor.
[in] | src | Source tensor to copy from. |
Definition at line 36 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 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::cpu::avg_poolingMxNxD_q8_neon_ndhwc(), arm_compute::cpu::bounding_box_transform(), arm_compute::cpu::bounding_box_transform_qsymm16(), CLAuxTensorHandler::CLAuxTensorHandler(), ICLTensor::clear(), arm_compute::colorconvert_iyuv_to_rgb(), arm_compute::colorconvert_nv12_to_rgb(), arm_compute::utils::compare_tensor(), arm_compute::cpu::compute_all_anchors(), arm_compute::cpu::compute_all_anchors_qasymm16(), CPPDetectionOutputLayer::configure(), ICLSimpleKernel::configure(), NETileKernel::configure(), NEChannelShuffleLayerKernel::configure(), NEDepthToSpaceLayerKernel::configure(), NEPriorBoxLayerKernel::configure(), NEReverseKernel::configure(), CPPTopKVKernel::configure(), NEInstanceNormalizationLayerKernel::configure(), NEComputeAllAnchorsKernel::configure(), NEReorgLayerKernel::configure(), NESpaceToDepthLayerKernel::configure(), CLMaxUnpoolingLayerKernel::configure(), CPPUpsampleKernel::configure(), NEBitwiseNotKernel::configure(), NEFFTScaleKernel::configure(), CLBitwiseKernel::configure(), CLInstanceNormalizationLayerKernel::configure(), NEBatchToSpaceLayerKernel::configure(), NEBitwiseAndKernel::configure(), NEBitwiseOrKernel::configure(), NEBitwiseXorKernel::configure(), NEFFTDigitReverseKernel::configure(), NEQLSTMLayerNormalizationKernel::configure(), CLChannelShuffleLayerKernel::configure(), NESpaceToBatchLayerKernel::configure(), CPPPermuteKernel::configure(), CPPBoxWithNonMaximaSuppressionLimit::configure(), NENormalizationLayerKernel::configure(), CLSelectKernel::configure(), CLDeconvolutionLayerUpsampleKernel::configure(), CLComputeAllAnchorsKernel::configure(), NEFlattenLayer::configure(), CLNormalizationLayerKernel::configure(), NEReshapeLayer::configure(), CLDepthToSpaceLayerKernel::configure(), CLQLSTMLayerNormalizationKernel::configure(), CLFFTScaleKernel::configure(), NEMeanStdDevNormalizationKernel::configure(), NEPadLayerKernel::configure(), NERangeKernel::configure(), CLSpaceToDepthLayerKernel::configure(), CPPBoxWithNonMaximaSuppressionLimitKernel::configure(), CPPDetectionPostProcessLayer::configure(), NECopy::configure(), NEBoundingBoxTransformKernel::configure(), NETranspose::configure(), NEFFTRadixStageKernel::configure(), CLGatherKernel::configure(), CLSpaceToBatchLayerKernel::configure(), CLTileKernel::configure(), NEROIPoolingLayerKernel::configure(), CPPNonMaximumSuppressionKernel::configure(), NEReductionOperationKernel::configure(), CLComparisonKernel::configure(), NEStackLayerKernel::configure(), CLBatchToSpaceLayerKernel::configure(), CLMeanStdDevNormalizationKernel::configure(), NELogicalAnd::configure(), NEQuantizationLayer::configure(), CLFFTDigitReverseKernel::configure(), CLReorgLayerKernel::configure(), NEFuseBatchNormalizationKernel::configure(), CLComparison::configure(), NESelectKernel::configure(), CLNormalizePlanarYUVLayerKernel::configure(), NECropKernel::configure(), NEROIAlignLayerKernel::configure(), NEDequantizationLayer::configure(), NEPermute::configure(), CLRangeKernel::configure(), CLReductionOperationKernel::configure(), CLReverseKernel::configure(), NEGatherKernel::configure(), NEFFT2D::configure(), NEBatchNormalizationLayerKernel::configure(), NEReduceMean::configure(), NESlice::configure(), CLFFTRadixStageKernel::configure(), NEPReluLayer::configure(), CLReshapeLayer::configure(), CLL2NormalizeLayerKernel::configure(), NEStridedSlice::configure(), CLPadLayerKernel::configure(), NERNNLayer::configure(), NESpaceToBatchLayer::configure(), CLRsqrtLayer::configure(), NEElementwiseMax::configure(), NESoftmaxLayerGeneric< IS_LOG >::configure(), NEPooling3dLayer::configure(), CLArgMinMaxLayerKernel::configure(), CLFlattenLayer::configure(), CLReduceMean::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), CLBoundingBoxTransformKernel::configure(), NEScale::configure(), CLPriorBoxLayerKernel::configure(), NEConv3D::configure(), NECropResize::configure(), NEFFT1D::configure(), NEMaxUnpoolingLayer::configure(), CLROIPoolingLayerKernel::configure(), CLLogicalNot::configure(), NEReductionOperation::configure(), CLStackLayerKernel::configure(), CLLogicalAnd::configure(), CLLogicalOr::configure(), NEDetectionPostProcessLayer::configure(), CLConv3D::configure(), NEArgMinMaxLayer::configure(), NEGEMM::configure(), NEGEMMLowpOutputStage::configure(), CLROIAlignLayerKernel::configure(), CLDequantizationLayer::configure(), CLFFT2D::configure(), NEPoolingLayer::configure(), NEArithmeticSubtraction::configure(), CLPReluLayer::configure(), CLSoftmaxLayerGeneric< IS_LOG >::configure(), NEAddMulAdd::configure(), NEDepthwiseConvolutionLayer::configure(), CLFFT1D::configure(), CLPooling3dLayer::configure(), NEPadLayer::configure(), CLSpaceToBatchLayer::configure(), CLScale::configure(), CLDeconvolutionLayerUpsample::configure(), CLFullyConnectedLayer::configure(), CLPoolingLayer::configure(), CLQuantizationLayer::configure(), CLSlice::configure(), CLDeconvolutionReshapeOutputKernel::configure(), NEDirectConvolutionLayer::configure(), CLRNNLayer::configure(), NEWinogradConvolutionLayer::configure(), CLDeconvolutionLayer::configure(), NEGEMMConv2d::configure(), CLFuseBatchNormalizationKernel::configure(), CLDepthwiseConvolutionLayer::configure(), CLBatchNormalizationLayerKernel::configure(), CLMatMul::configure(), CLReductionOperation::configure(), CLArgMinMaxLayer::configure(), CLGEMM::configure(), CLPadLayer::configure(), NEFFTConvolutionLayer::configure(), NEGEMMConvolutionLayer::configure(), NEGenerateProposalsLayer::configure(), NEPixelWiseMultiplication::configure(), CLIndirectConvolutionLayer::configure(), CLGEMMLowpOutputStage::configure(), NEMatMul::configure(), NEGEMMLowpMatrixMultiplyCore::configure(), CLDirectConvolutionLayer::configure(), NELSTMLayerQuantized::configure(), NELSTMLayer::configure(), CLCropResize::configure(), CLPixelWiseMultiplication::configure(), CLWinogradConvolutionLayer::configure(), CLArithmeticAddition::configure(), CLComputeMeanVariance::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), CLComparisonStatic< COP >::configure(), NEDeconvolutionLayer::configure(), NELogicalOr::configure(), CLFFTConvolutionLayer::configure(), NEConvolutionLayer::configure(), CLGenerateProposalsLayer::configure(), CLGEMMConvolutionLayer::configure(), NEFullyConnectedLayer::configure(), CLExpLayer::configure(), CLGEMMDeconvolutionLayer::configure(), CLDirectDeconvolutionLayer::configure(), NEQLSTMLayer::configure(), CLLSTMLayerQuantized::configure(), NEElementwiseMin::configure(), CLConvolutionLayer::configure(), NELogicalNot::configure(), NEComplexPixelWiseMultiplication::configure(), CLLSTMLayer::configure(), CLComplexPixelWiseMultiplication::configure(), CLNegLayer::configure(), CLQLSTMLayer::configure(), NEElementwiseSquaredDiff::configure(), CLArithmeticSubtraction::configure(), CLSinLayer::configure(), NEElementwiseDivision::configure(), CLLogLayer::configure(), NEElementwisePower::configure(), CLArithmeticDivision::configure(), CLAbsLayer::configure(), NEElementwiseComparison::configure(), CLRoundLayer::configure(), CLElementwiseMax::configure(), NEElementwiseComparisonStatic< op >::configure(), CLElementwiseMin::configure(), CLElementwiseSquaredDiff::configure(), CLElementwisePower::configure(), NECropKernel::configure_output_shape(), arm_compute::cpu::kernels::convolve_nchw(), arm_compute::cpu::kernels::convolve_nhwc(), ITensor::copy_from(), CpuAuxTensorHandler::CpuAuxTensorHandler(), 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 >(), Accessor::data_layout(), Accessor::data_type(), arm_compute::cpu::depthwise_loop_generic_fp(), arm_compute::cpu::depthwise_loop_multiplier1_fp(), arm_compute::cpu::directconv3d_float_neon_ndhwc(), arm_compute::cpu::directconv3d_quantized_neon_ndhwc(), Accessor::element_size(), 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< 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::error_on_mismatching_shapes(), Accessor::format(), arm_compute::cpu::fused_batch_normalization_conv(), arm_compute::cpu::fused_batch_normalization_dwc_nchw(), arm_compute::cpu::fused_batch_normalization_dwc_nhwc(), ITensorV2::get_size(), arm_compute::cpu::in_bounds_crop_window(), arm_compute::cpu::instance_normalization_nchw(), arm_compute::cpu::l2_normalize_x(), arm_compute::cpu::l2_normalize_yz(), arm_compute::cpu::matrix_matrix_multiply_f32(), arm_compute::cpu::max_poolingMxNxD_q8_neon_ndhwc(), arm_compute::cpu::max_unpooling(), arm_compute::cpu::mul_F32_F32_F32(), arm_compute::cpu::neon_qasymm8_meanstddevnorm(), arm_compute::cpu::neon_softmax_float(), arm_compute::cpu::neon_softmax_quantized(), arm_compute::normalize_float(), Accessor::num_channels(), Accessor::num_elements(), Accessor::padding(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), CpuDepthwiseConv2dAssemblyDispatch::prepare(), NEStackLayerKernel::prepare(), CpuWinogradConv2d::prepare(), ClGemmLowpMatrixMultiplyCore::prepare(), CLDepthwiseConvolutionLayer::prepare(), ITensor::ptr_to_element(), Accessor::quantization_info(), arm_compute::cpu::roi_align(), CpuElementwiseBase::run(), CpuElementwiseUnary::run(), CPPUpsampleKernel::run(), CpuAddMulAdd::run(), NEROIPoolingLayerKernel::run(), NETileKernel::run(), NEChannelShuffleLayerKernel::run(), NESpaceToDepthLayerKernel::run(), NEComputeAllAnchorsKernel::run(), NEReorgLayerKernel::run(), NEInstanceNormalizationLayerKernel::run(), NEDepthToSpaceLayerKernel::run(), NEReverseKernel::run(), CPPDetectionOutputLayer::run(), CPPTopKVKernel::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run(), NERangeKernel::run(), NEMeanStdDevNormalizationKernel::run(), CLInstanceNormalizationLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), NESelectKernel::run(), CLQLSTMLayerNormalizationKernel::run(), NEFFTRadixStageKernel::run(), CLMeanStdDevNormalizationKernel::run(), CLROIPoolingLayerKernel::run(), NEBoundingBoxTransformKernel::run(), CLComparisonKernel::run(), NEFillBorderKernel::run(), CpuMatMul::run(), CLReductionOperationKernel::run(), NEROIAlignLayerKernel::run(), CLArgMinMaxLayerKernel::run(), CPPDetectionPostProcessLayer::run(), NECropKernel::run(), CLPriorBoxLayerKernel::run(), CLStackLayerKernel::run(), NEBatchNormalizationLayerKernel::run(), NEBatchToSpaceLayerKernel::run(), CLROIAlignLayerKernel::run(), NESpaceToBatchLayerKernel::run(), ClGemm::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), CLComputeMeanVariance::run(), CpuGemmConv2d::run(), arm_compute::cpu::run_depthwise_quanitized8bit(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), CpuWinogradConv2dTransformInputKernel::run_op(), ClSoftmaxKernel::run_op(), ClMatMulNativeKernel::run_op(), CpuCastKernel::run_op(), CpuPool2dAssemblyWrapperKernel::run_op(), CpuGemmLowpOffsetContributionKernel::run_op(), CpuDepthwiseConv2dAssemblyWrapperKernel::run_op(), CpuWinogradConv2dTransformOutputKernel::run_op(), arm_compute::run_reverse(), arm_compute::cpu::select_op_not_same_rank(), Accessor::shape(), Accessor::size(), arm_compute::cpu::sub_qsymm16_neon(), arm_compute::cpu::sub_same_neon(), arm_compute::cpu::sve2_softmax_logits_1d_quantized(), arm_compute::cpu::sve_softmax_logits_1d_float(), and arm_compute::cpu::vector_matrix_multiply_f32().
|
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 162 of file ITensor.cpp.
Referenced by CLFullyConnectedLayer::prepare(), NEFFTConvolutionLayer::prepare(), CLDepthwiseConvolutionLayer::prepare(), NEDeconvolutionLayer::prepare(), CLFFTConvolutionLayer::prepare(), CLGEMMDeconvolutionLayer::prepare(), CLDirectDeconvolutionLayer::prepare(), NEFullyConnectedLayer::prepare(), CLTensorHandle::release_if_unused(), and NETensorHandle::release_if_unused().
void mark_as_unused | ( | ) | const |
Marks a tensor as unused.
Definition at line 167 of file ITensor.cpp.
Referenced by CpuDepthwiseConv2dAssemblyDispatch::prepare(), ClFullyConnected::prepare(), CpuFullyConnected::prepare(), NEFFTConvolutionLayer::prepare(), CLDepthwiseConvolutionLayer::prepare(), NEDeconvolutionLayer::prepare(), CLFFTConvolutionLayer::prepare(), CLGEMMDeconvolutionLayer::prepare(), CLDirectDeconvolutionLayer::prepare(), NELSTMLayerQuantized::prepare(), CLLSTMLayerQuantized::prepare(), NEQLSTMLayer::prepare(), CLQLSTMLayer::prepare(), IWeightsManager::release(), and IWeightsManager::run().
void mark_as_used | ( | ) | const |
Marks a tensor as used.
Definition at line 172 of file ITensor.cpp.
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::batch_normalization_nchw(), arm_compute::cpu::compute_all_anchors(), arm_compute::cpu::compute_all_anchors_qasymm16(), NECropKernel::configure_output_shape(), arm_compute::cpu::fused_batch_normalization_conv(), arm_compute::cpu::fused_batch_normalization_dwc_nchw(), arm_compute::cpu::fused_batch_normalization_dwc_nhwc(), Accessor::operator()(), CLAccessor::operator()(), ClGemmLowpMatrixMultiplyCore::prepare(), CLDepthwiseConvolutionLayer::prepare(), arm_compute::cpu::roi_align(), NETileKernel::run(), NESpaceToDepthLayerKernel::run(), CPPDetectionOutputLayer::run(), CPPNonMaximumSuppressionKernel::run(), CPPDetectionPostProcessLayer::run(), NECropKernel::run(), NEBatchToSpaceLayerKernel::run(), NESpaceToBatchLayerKernel::run(), NECropResize::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), and arm_compute::run_reverse().