23.08
|
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(), NEReorgLayerKernel::run(), CpuGemmConv2d::run(), CpuWinogradConv2dTransformInputKernel::run_op(), CpuDepthwiseConv2dAssemblyWrapperKernel::run_op(), CpuPool2dAssemblyWrapperKernel::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(), CLComparisonKernel::border_size(), 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(), NEReverseKernel::configure(), NEChannelShuffleLayerKernel::configure(), NEDepthToSpaceLayerKernel::configure(), NEPriorBoxLayerKernel::configure(), NESpaceToDepthLayerKernel::configure(), CPPTopKVKernel::configure(), NEInstanceNormalizationLayerKernel::configure(), NEComputeAllAnchorsKernel::configure(), NEReorgLayerKernel::configure(), CLInstanceNormalizationLayerKernel::configure(), CLMaxUnpoolingLayerKernel::configure(), CPPUpsampleKernel::configure(), NEBatchToSpaceLayerKernel::configure(), NEBitwiseNotKernel::configure(), NEFFTDigitReverseKernel::configure(), NEFFTScaleKernel::configure(), CLBitwiseKernel::configure(), NEQLSTMLayerNormalizationKernel::configure(), NESpaceToBatchLayerKernel::configure(), CPPPermuteKernel::configure(), NEBitwiseAndKernel::configure(), NEBitwiseOrKernel::configure(), NEBitwiseXorKernel::configure(), CLReverseKernel::configure(), CLSelectKernel::configure(), NENormalizationLayerKernel::configure(), CLChannelShuffleLayerKernel::configure(), CPPBoxWithNonMaximaSuppressionLimit::configure(), CLDepthToSpaceLayerKernel::configure(), CLSpaceToDepthLayerKernel::configure(), CLDeconvolutionLayerUpsampleKernel::configure(), NEPadLayerKernel::configure(), NERangeKernel::configure(), CLComputeAllAnchorsKernel::configure(), NEFlattenLayer::configure(), CLNormalizationLayerKernel::configure(), NEReshapeLayer::configure(), CLQLSTMLayerNormalizationKernel::configure(), NEBoundingBoxTransformKernel::configure(), NEFFTRadixStageKernel::configure(), NEMeanStdDevNormalizationKernel::configure(), CLFFTScaleKernel::configure(), CLSpaceToBatchLayerKernel::configure(), CLGatherKernel::configure(), NEROIPoolingLayerKernel::configure(), CPPBoxWithNonMaximaSuppressionLimitKernel::configure(), CLTileKernel::configure(), CLComparisonKernel::configure(), NEStackLayerKernel::configure(), CPPDetectionPostProcessLayer::configure(), NECopy::configure(), CLBatchToSpaceLayerKernel::configure(), NETranspose::configure(), CLFFTDigitReverseKernel::configure(), CLReorgLayerKernel::configure(), NEReductionOperationKernel::configure(), NESelectKernel::configure(), CPPNonMaximumSuppressionKernel::configure(), CLMeanStdDevNormalizationKernel::configure(), NELogicalAnd::configure(), NEQuantizationLayer::configure(), NEFuseBatchNormalizationKernel::configure(), CLComparison::configure(), CLNormalizePlanarYUVLayerKernel::configure(), NECropKernel::configure(), CLRangeKernel::configure(), CLReductionOperationKernel::configure(), NEGatherKernel::configure(), NEROIAlignLayerKernel::configure(), NEDequantizationLayer::configure(), NEBatchNormalizationLayerKernel::configure(), CLPadLayerKernel::configure(), NEPermute::configure(), NESlice::configure(), CLPriorBoxLayerKernel::configure(), CLFFTRadixStageKernel::configure(), CLL2NormalizeLayerKernel::configure(), NEFFT2D::configure(), NEPReluLayer::configure(), NEReduceMean::configure(), CLReshapeLayer::configure(), NEStridedSlice::configure(), CLBoundingBoxTransformKernel::configure(), NERNNLayer::configure(), CLArgMinMaxLayerKernel::configure(), NESpaceToBatchLayer::configure(), NESoftmaxLayerGeneric< IS_LOG >::configure(), NEElementwiseMax::configure(), NEPooling3dLayer::configure(), CLRsqrtLayer::configure(), CLFlattenLayer::configure(), NEMaxUnpoolingLayer::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), CLROIPoolingLayerKernel::configure(), CLStackLayerKernel::configure(), CLReduceMean::configure(), NECropResize::configure(), NEScale::configure(), NEReductionOperation::configure(), NEConv3D::configure(), NEFFT1D::configure(), CLLogicalNot::configure(), CLLogicalAnd::configure(), CLLogicalOr::configure(), CLROIAlignLayerKernel::configure(), CLConv3D::configure(), NEDetectionPostProcessLayer::configure(), NEGEMM::configure(), NEGEMMLowpOutputStage::configure(), CLDequantizationLayer::configure(), NEPoolingLayer::configure(), CLDeconvolutionReshapeOutputKernel::configure(), CLFFT2D::configure(), NEArithmeticSubtraction::configure(), NEDepthwiseConvolutionLayer::configure(), CLPReluLayer::configure(), CLRNNLayer::configure(), NEAddMulAdd::configure(), CLFuseBatchNormalizationKernel::configure(), CLBatchNormalizationLayerKernel::configure(), CLDeconvolutionLayerUpsample::configure(), NEPadLayer::configure(), CLDeconvolutionLayer::configure(), CLFFT1D::configure(), CLPooling3dLayer::configure(), CLSpaceToBatchLayer::configure(), CLPoolingLayer::configure(), CLScale::configure(), CLFullyConnectedLayer::configure(), CLSlice::configure(), CLQuantizationLayer::configure(), NEDirectConvolutionLayer::configure(), NEGEMMConv2d::configure(), CLSoftmaxLayerGeneric< IS_LOG >::configure(), NEWinogradConvolutionLayer::configure(), CLMatMul::configure(), CLDepthwiseConvolutionLayer::configure(), CLPadLayer::configure(), CLIndirectConvolutionLayer::configure(), CLReductionOperation::configure(), CLArgMinMaxLayer::configure(), CLGEMM::configure(), NEFFTConvolutionLayer::configure(), CLDirectConvolutionLayer::configure(), NEGenerateProposalsLayer::configure(), CLGEMMLowpOutputStage::configure(), NEGEMMConvolutionLayer::configure(), NEPixelWiseMultiplication::configure(), NEGEMMLowpMatrixMultiplyCore::configure(), NEMatMul::configure(), CLCropResize::configure(), CLPixelWiseMultiplication::configure(), NELSTMLayerQuantized::configure(), CLWinogradConvolutionLayer::configure(), NELSTMLayer::configure(), CLComputeMeanVariance::configure(), CLArithmeticAddition::configure(), CLComparisonStatic< COP >::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), CLFFTConvolutionLayer::configure(), NELogicalOr::configure(), NEDeconvolutionLayer::configure(), CLGenerateProposalsLayer::configure(), NEConvolutionLayer::configure(), CLGEMMConvolutionLayer::configure(), CLGEMMDeconvolutionLayer::configure(), CLDirectDeconvolutionLayer::configure(), NEFullyConnectedLayer::configure(), CLLSTMLayerQuantized::configure(), CLExpLayer::configure(), NEQLSTMLayer::configure(), NEElementwiseMin::configure(), CLConvolutionLayer::configure(), NEComplexPixelWiseMultiplication::configure(), CLComplexPixelWiseMultiplication::configure(), NELogicalNot::configure(), CLLSTMLayer::configure(), CLQLSTMLayer::configure(), CLNegLayer::configure(), NEElementwiseSquaredDiff::configure(), CLArithmeticSubtraction::configure(), CLSinLayer::configure(), NEElementwiseDivision::configure(), CLLogLayer::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(), 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::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::neon_qasymm8_meanstddevnorm(), arm_compute::cpu::neon_softmax_logits_1d_float(), arm_compute::cpu::neon_softmax_logits_1d_quantized(), Accessor::num_channels(), Accessor::num_elements(), Accessor::padding(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), CpuDepthwiseConv2dAssemblyDispatch::prepare(), CpuWinogradConv2d::prepare(), ClGemmLowpMatrixMultiplyCore::prepare(), CLDepthwiseConvolutionLayer::prepare(), ITensor::ptr_to_element(), Accessor::quantization_info(), arm_compute::cpu::roi_align(), CpuElementwiseBase::run(), CpuElementwiseUnary::run(), CpuAddMulAdd::run(), CPPUpsampleKernel::run(), NEROIPoolingLayerKernel::run(), CPPDetectionOutputLayer::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run(), NETileKernel::run(), NEDepthToSpaceLayerKernel::run(), NESpaceToDepthLayerKernel::run(), NEChannelShuffleLayerKernel::run(), NEReverseKernel::run(), NEInstanceNormalizationLayerKernel::run(), NEComputeAllAnchorsKernel::run(), CPPTopKVKernel::run(), CLInstanceNormalizationLayerKernel::run(), NEReorgLayerKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), NERangeKernel::run(), CLQLSTMLayerNormalizationKernel::run(), NEMeanStdDevNormalizationKernel::run(), CpuMatMul::run(), CLROIPoolingLayerKernel::run(), CLComparisonKernel::run(), NEFillBorderKernel::run(), NESelectKernel::run(), CLMeanStdDevNormalizationKernel::run(), NEBoundingBoxTransformKernel::run(), NEFFTRadixStageKernel::run(), NEStackLayerKernel::run(), CLReductionOperationKernel::run(), CLPriorBoxLayerKernel::run(), CPPDetectionPostProcessLayer::run(), NEROIAlignLayerKernel::run(), CLArgMinMaxLayerKernel::run(), NECropKernel::run(), CLStackLayerKernel::run(), NEBatchNormalizationLayerKernel::run(), NEBatchToSpaceLayerKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), NESpaceToBatchLayerKernel::run(), CLROIAlignLayerKernel::run(), ClGemm::run(), CLComputeMeanVariance::run(), CpuGemmConv2d::run(), arm_compute::cpu::run_depthwise_quanitized8bit(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), CpuWinogradConv2dTransformInputKernel::run_op(), ClMatMulNativeKernel::run_op(), CpuGemmLowpOffsetContributionKernel::run_op(), CpuCastKernel::run_op(), CpuPool2dAssemblyWrapperKernel::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 164 of file ITensor.cpp.
Referenced by CLFullyConnectedLayer::prepare(), CLDepthwiseConvolutionLayer::prepare(), NEFFTConvolutionLayer::prepare(), CLFFTConvolutionLayer::prepare(), NEDeconvolutionLayer::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 169 of file ITensor.cpp.
Referenced by CpuDepthwiseConv2dAssemblyDispatch::prepare(), ClFullyConnected::prepare(), CpuFullyConnected::prepare(), CLDepthwiseConvolutionLayer::prepare(), NEFFTConvolutionLayer::prepare(), CLFFTConvolutionLayer::prepare(), NEDeconvolutionLayer::prepare(), CLGEMMDeconvolutionLayer::prepare(), NELSTMLayerQuantized::prepare(), CLDirectDeconvolutionLayer::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 174 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::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(), CPPDetectionOutputLayer::run(), NETileKernel::run(), NEDepthToSpaceLayerKernel::run(), NESpaceToDepthLayerKernel::run(), CPPNonMaximumSuppressionKernel::run(), CPPDetectionPostProcessLayer::run(), NECropKernel::run(), NEBatchToSpaceLayerKernel::run(), NESpaceToBatchLayerKernel::run(), NECropResize::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), and arm_compute::run_reverse().