Compute Library
 21.02
ITensor Class Referenceabstract

Interface for Neon tensor. More...

#include <ITensor.h>

Public Member Functions

virtual ITensorInfoinfo () const =0
 Interface to be implemented by the child class to return the tensor's metadata. More...
 
virtual ITensorInfoinfo ()=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...
 

Detailed Description

Interface for Neon tensor.

Definition at line 36 of file ITensor.h.

Constructor & Destructor Documentation

◆ ~ITensor()

virtual ~ITensor ( )
virtualdefault

Default virtual destructor.

Member Function Documentation

◆ buffer()

virtual uint8_t* buffer ( ) const
pure virtual

◆ copy_from()

void copy_from ( const ITensor src)

Copy the content of another tensor.

Note
The number of dimensions of the source tensor must be less or equal to those of the destination tensor.
All dimensions of the destination tensor must be greater or equal to the source tensor ones.
num_channels() and element_size() of both tensors must match.
Parameters
[in]srcSource tensor to copy from.

Definition at line 35 of file ITensor.cpp.

References IOFormatInfo::align_columns, ValidRegion::anchor, ARM_COMPUTE_ERROR_ON, BorderSize::bottom, ITensor::buffer(), ITensorInfo::data_type(), IOFormatInfo::Default, ITensorInfo::dimension(), Window::DimY, dt, IOFormatInfo::element_delim, ITensorInfo::element_size(), arm_compute::execute_window_loop(), IOFormatInfo::Full, ITensor::info(), arm_compute::is_data_type_float(), BorderSize::left, IOFormatInfo::NoPadding, ITensorInfo::num_channels(), ITensorInfo::num_dimensions(), offset(), ITensorInfo::offset_element_in_bytes(), ITensorInfo::offset_first_element_in_bytes(), ITensorInfo::padding(), IOFormatInfo::precision, IOFormatInfo::precision_type, ITensor::print(), IOFormatInfo::print_region, Iterator::ptr(), BorderSize::right, IOFormatInfo::row_delim, ITensorInfo::set_valid_region(), ValidRegion::shape, arm_compute::test::validation::src_info, ITensorInfo::strides_in_bytes(), ITensorInfo::tensor_shape(), BorderSize::top, TensorShape::total_size_upper(), Window::use_tensor_dimensions(), arm_compute::test::validation::valid_region, ITensorInfo::valid_region(), IOFormatInfo::ValidRegion, Dimensions< T >::x(), and Dimensions< T >::y().

Referenced by ITensor::ptr_to_element().

36 {
37  if(&src == this)
38  {
39  return;
40  }
41 
42  const ITensorInfo *src_info = src.info();
43  ITensorInfo *dst_info = this->info();
44 
45  ARM_COMPUTE_ERROR_ON(src_info->num_dimensions() > dst_info->num_dimensions());
46  ARM_COMPUTE_ERROR_ON(src_info->num_channels() != dst_info->num_channels());
47  ARM_COMPUTE_ERROR_ON(src_info->element_size() != dst_info->element_size());
48 
49  for(size_t d = 0; d < src_info->num_dimensions(); d++)
50  {
51  ARM_COMPUTE_ERROR_ON(src_info->dimension(d) > dst_info->dimension(d));
52  }
53 
54  // Copy information about valid region
55  dst_info->set_valid_region(src_info->valid_region());
56 
57  Window win_src;
58  win_src.use_tensor_dimensions(src_info->tensor_shape(), Window::DimY);
59  Window win_dst;
60  win_dst.use_tensor_dimensions(dst_info->tensor_shape(), Window::DimY);
61 
62  Iterator src_it(&src, win_src);
63  Iterator dst_it(this, win_dst);
64 
65  const size_t line_size = src_info->element_size() * src_info->dimension(0);
66 
68  win_src, [&](const Coordinates &)
69  {
70  memcpy(dst_it.ptr(), src_it.ptr(), line_size);
71  },
72  src_it, dst_it);
73 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
SimpleTensor< float > src
Definition: DFT.cpp:155
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor&#39;s metadata.
TensorInfo src_info(src_shape, 1, data_type)
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Definition: Window.h:45
void execute_window_loop(const Window &w, L &&lambda_function, Ts &&... iterators)
Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...
Definition: Helpers.inl:77

◆ info() [1/2]

virtual ITensorInfo* info ( ) const
pure virtual

Interface to be implemented by the child class to return the tensor's metadata.

Returns
A pointer to the tensor's metadata.

Implemented in CLSubTensor, GCTensor, 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(), arm_compute::cpu::bilinear_neon_scale(), CLComparisonKernel::border_size(), IGCTensor::clear(), ICLTensor::clear(), CLQLSTMLayer::CLQLSTMLayer(), CLSubTensor::CLSubTensor(), arm_compute::colorconvert_iyuv_to_rgb(), arm_compute::colorconvert_nv12_to_rgb(), arm_compute::utils::compare_tensor(), GCLogits1DMaxKernel::configure(), GCScaleKernel::configure(), NEFlattenLayer::configure(), GCTransposeKernel::configure(), CLIntegralImageHorKernel::configure(), NEScale::configure(), GCGEMMMatrixAccumulateBiasesKernel::configure(), CLGaussian3x3Kernel::configure(), CLTransposeKernel::configure(), CLWarpPerspectiveKernel::configure(), CLBox3x3Kernel::configure(), CLDilateKernel::configure(), CLErodeKernel::configure(), CLMedian3x3Kernel::configure(), CLNonMaximaSuppression3x3Kernel::configure(), CLScaleKernel::configure(), NELogicalAnd::configure(), CPPDetectionOutputLayer::configure(), CLWarpAffineKernel::configure(), ICLSimpleKernel::configure(), NEReshapeLayer::configure(), NEDequantizationLayerKernel::configure(), NEIntegralImageKernel::configure(), IGCSimpleKernel::configure(), GCDepthwiseConvolutionLayer3x3Kernel::configure(), GCPixelWiseMultiplicationKernel::configure(), NEBatchToSpaceLayerKernel::configure(), NEFill::configure(), NEBox3x3Kernel::configure(), NEDilateKernel::configure(), NEErodeKernel::configure(), NEGaussian3x3Kernel::configure(), NEGaussianPyramidHorKernel::configure(), NEMedian3x3Kernel::configure(), NEReverseKernel::configure(), NETileKernel::configure(), GCFillBorderKernel::configure(), GCGEMMMatrixAdditionKernel::configure(), GCNormalizationLayerKernel::configure(), GCPoolingLayerKernel::configure(), NECopy::configure(), CLFillBorderKernel::configure(), NEChannelShuffleLayerKernel::configure(), NEConvertQuantizedSignednessKernel::configure(), NEDepthToSpaceLayerKernel::configure(), NEGaussian5x5HorKernel::configure(), NEPriorBoxLayerKernel::configure(), NESpaceToDepthLayerKernel::configure(), NETableLookupKernel::configure(), GCAbsoluteDifferenceKernel::configure(), GCNormalizePlanarYUVLayerKernel::configure(), GCConcatenateLayer::configure(), NEComputeAllAnchorsKernel::configure(), NEInstanceNormalizationLayerKernel::configure(), CPPTopKVKernel::configure(), NEReorgLayerKernel::configure(), NEThresholdKernel::configure(), INEWarpKernel::configure(), CLDequantizationLayerKernel::configure(), CLComparison::configure(), GCArithmeticAdditionKernel::configure(), CLFlattenLayer::configure(), GCGEMMTranspose1xWKernel::configure(), NEElementwiseMax::configure(), NEBitwiseNotKernel::configure(), CLGaussianPyramidHorKernel::configure(), NEFFTDigitReverseKernel::configure(), NEFFTScaleKernel::configure(), CPPUpsampleKernel::configure(), NEQLSTMLayerNormalizationKernel::configure(), NESpaceToBatchLayerKernel::configure(), CLBitwiseKernel::configure(), CLDepthwiseConvolutionLayerReshapeWeightsKernel::configure(), CLMaxUnpoolingLayerKernel::configure(), CLMinMaxLayerKernel::configure(), CLChannelShuffleLayerKernel::configure(), GCNormalizationLayer::configure(), NEBitwiseAndKernel::configure(), NEBitwiseOrKernel::configure(), NEBitwiseXorKernel::configure(), NEChannelExtractKernel::configure(), NEColorConvertKernel::configure(), NEPermute::configure(), CLReverseKernel::configure(), NESoftmaxLayerGeneric< IS_LOG >::configure(), CLSelectKernel::configure(), NEHOGOrientationBinningKernel::configure(), CPPPermuteKernel::configure(), NENormalizationLayerKernel::configure(), CLHistogramKernel::configure(), NETransposeKernel::configure(), GCActivationLayerKernel::configure(), GCBatchNormalizationLayerKernel::configure(), GCDepthConcatenateLayerKernel::configure(), GCDirectConvolutionLayerKernel< kernel_size >::configure(), GCConvolutionLayerReshapeWeights::configure(), NEAbsoluteDifferenceKernel::configure(), NEAccumulateKernel::configure(), GCSoftmaxLayer::configure(), NEReduceMean::configure(), NEDerivativeKernel::configure(), CLSpaceToDepthLayerKernel::configure(), NEQuantizationLayerKernel::configure(), CLDepthToSpaceLayerKernel::configure(), CLBatchToSpaceLayerKernel::configure(), CLMinMaxKernel::configure(), CPPBoxWithNonMaximaSuppressionLimit::configure(), NEFFT2D::configure(), NERNNLayer::configure(), NEFastCornersKernel::configure(), NEFillArrayKernel::configure(), CLDeconvolutionLayerUpsampleKernel::configure(), NEMagnitudePhaseKernel< mag_type, phase_type >::configure(), NEMaxUnpoolingLayerKernel::configure(), NEMinMaxKernel::configure(), NENonMaximaSuppression3x3Kernel::configure(), NERangeKernel::configure(), CLComputeAllAnchorsKernel::configure(), NESobel5x5HorKernel::configure(), NESobel7x7HorKernel::configure(), CLReshapeLayer::configure(), CLNormalizationLayerKernel::configure(), NEArithmeticSubtraction::configure(), CLFFTScaleKernel::configure(), CLQLSTMLayerNormalizationKernel::configure(), NEGradientKernel::configure(), CLGatherKernel::configure(), NESpaceToBatchLayer::configure(), NEUnstack::configure(), CLSpaceToBatchLayerKernel::configure(), NEFFTRadixStageKernel::configure(), CPPBoxWithNonMaximaSuppressionLimitKernel::configure(), NEMeanStdDevKernel::configure(), NEMeanStdDevNormalizationKernel::configure(), NENonLinearFilterKernel::configure(), NEBoundingBoxTransformKernel::configure(), GCDropoutLayerKernel::configure(), CLGradientKernel::configure(), CLReduceMean::configure(), GCLogits1DShiftExpSumKernel::configure(), CLNonLinearFilterKernel::configure(), NEChannelCombineKernel::configure(), NEReductionOperation::configure(), CLComparisonKernel::configure(), NEFillBorderKernel::configure(), CLTileKernel::configure(), CLGEMMLowpQuantizeDownInt32ScaleByFixedPointKernel::configure(), NEHOGDetectorKernel::configure(), NEMinMaxLayerKernel::configure(), NEPadLayerKernel::configure(), NEScaleKernel::configure(), NEStackLayerKernel::configure(), CLRsqrtLayer::configure(), GCGEMMMatrixMultiplyKernel::configure(), CLUnstack::configure(), CLFFTDigitReverseKernel::configure(), NEDepthwiseConvolutionAssemblyDispatch::configure(), NEDepthwiseConvolutionLayer::configure(), CLChannelExtractKernel::configure(), CLQuantizationLayerKernel::configure(), CLRemapKernel::configure(), CLReorgLayerKernel::configure(), NEConvertFullyConnectedWeightsKernel::configure(), NEDirectConvolutionLayerKernel::configure(), NEDirectConvolutionLayerOutputStageKernel::configure(), NEGatherKernel::configure(), CLAbsoluteDifferenceKernel::configure(), NEGEMMMatrixAdditionKernel::configure(), CPPCornerCandidatesKernel::configure(), CPPNonMaximumSuppressionKernel::configure(), NEReductionOperationKernel::configure(), NESelectKernel::configure(), CLHOGOrientationBinningKernel::configure(), CPPDetectionPostProcessLayer::configure(), NECropResize::configure(), NEPoolingLayer::configure(), CLSobel3x3Kernel::configure(), NEFuseBatchNormalizationKernel::configure(), NEGEMMMatrixMultiplyKernel::configure(), NEROIPoolingLayerKernel::configure(), CLInstanceNormalizationLayerKernel::configure(), CLDeconvolutionLayer::configure(), CLDerivativeKernel::configure(), CLMeanStdDevNormalizationKernel::configure(), NEBatchNormalizationLayerKernel::configure(), CLNormalizePlanarYUVLayerKernel::configure(), CLRangeKernel::configure(), NEInstanceNormalizationLayer::configure(), CLColorConvertKernel::configure(), NECropKernel::configure(), NECumulativeDistributionKernel::configure(), CLSobel5x5HorKernel::configure(), CLSobel7x7HorKernel::configure(), CLLogits1DMaxShiftExpSumKernel::configure(), NEROIAlignLayerKernel::configure(), GCGEMMInterleave4x4Kernel::configure(), GCDirectConvolutionLayer::configure(), CLPadLayerKernel::configure(), NEDetectionPostProcessLayer::configure(), NENormalizationLayer::configure(), NEGEMMLowpMatrixMultiplyKernel::configure(), NEFFT1D::configure(), CLMeanStdDevKernel::configure(), CLLogicalNot::configure(), CLPoolingLayer::configure(), CLFFTRadixStageKernel::configure(), CLPriorBoxLayerKernel::configure(), CLReductionOperationKernel::configure(), CLConvertFullyConnectedWeightsKernel::configure(), NEScharr3x3Kernel::configure(), NESobel3x3Kernel::configure(), CLChannelCombineKernel::configure(), CLMeanStdDev::configure(), CLL2NormalizeLayerKernel::configure(), CLFFT2D::configure(), GCTensorShiftKernel::configure(), NEConvolutionLayerReshapeWeights::configure(), NEHOGDescriptor::configure(), NEDepthConvertLayerKernel::configure(), CLBoundingBoxTransformKernel::configure(), CLRNNLayer::configure(), NEGaussian5x5::configure(), CLGEMMLowpMatrixMultiplyNativeKernel::configure(), NEDepthwiseConvolutionLayerNativeKernel::configure(), NEGEMMLowpQuantizeDownInt32ScaleKernel::configure(), CLMagnitudePhaseKernel::configure(), NEHOGGradient::configure(), NEGEMMInterleave4x4Kernel::configure(), NEGEMMLowpOffsetContributionKernel::configure(), NEGEMMLowpQuantizeDownInt32ToInt16ScaleByFixedPointKernel::configure(), NEPadLayer::configure(), CLDeconvolutionLayerUpsample::configure(), CLFFT1D::configure(), CLScale::configure(), CLStackLayerKernel::configure(), CLIntegralImageVertKernel::configure(), CLHOGGradient::configure(), CLSpaceToBatchLayer::configure(), NESobel5x5::configure(), NESobel7x7::configure(), NEGEMMLowpQuantizeDownInt32ToInt8ScaleByFixedPointKernel::configure(), NEGEMMLowpQuantizeDownInt32ToUint8ScaleByFixedPointKernel::configure(), CLGEMMReshapeLHSMatrixKernel::configure(), CLDepthConvertLayerKernel::configure(), CLDepthwiseConvolutionLayer3x3NCHWKernel::configure(), CLFastCornersKernel::configure(), NEGEMMConv2d::configure(), CLGEMMLowpQuantizeDownInt32ScaleByFloatKernel::configure(), CLArgMinMaxLayerKernel::configure(), CLGEMMLowpQuantizeDownInt32ScaleKernel::configure(), CLDepthwiseConvolutionLayer3x3NHWCKernel::configure(), NEFastCorners::configure(), GCWeightsReshapeKernel::configure(), GCGEMM::configure(), CLROIPoolingLayerKernel::configure(), NECol2ImKernel::configure(), GCCol2ImKernel::configure(), NEWinogradConvolutionLayer::configure(), CLHOGDescriptor::configure(), GCIm2ColKernel::configure(), NEConvolutionKernel< matrix_size >::configure(), CLROIAlignLayerKernel::configure(), CLDeconvolutionReshapeOutputKernel::configure(), CLHarrisScoreKernel::configure(), CLArgMinMaxLayer::configure(), CLDirectConvolutionLayer::configure(), CLPadLayer::configure(), CLReductionOperation::configure(), NELaplacianPyramid::configure(), CLScharr3x3Kernel::configure(), NEDirectConvolutionLayer::configure(), CLWinogradInputTransformKernel::configure(), CLHOGDetectorKernel::configure(), CLFuseBatchNormalizationKernel::configure(), CLBatchNormalizationLayerKernel::configure(), CLCol2ImKernel::configure(), CLWinogradFilterTransformKernel::configure(), CLGEMMMatrixMultiplyNativeKernel::configure(), NEWeightsReshapeKernel::configure(), NECannyEdge::configure(), CLConvolutionLayerReshapeWeights::configure(), CLGEMMLowpMatrixMultiplyReshapedKernel::configure(), CLGEMMMatrixMultiplyKernel::configure(), CLLaplacianPyramid::configure(), CLGEMMLowpOffsetContributionKernel::configure(), NEOpticalFlow::configure(), CLGaussian5x5::configure(), NEGenerateProposalsLayer::configure(), CLDepthwiseConvolutionLayer::configure(), NEFFTConvolutionLayer::configure(), NEPReluLayer::configure(), CLWinogradOutputTransformKernel::configure(), NEGEMMAssemblyDispatch::configure(), CLSobel5x5::configure(), CLSobel7x7::configure(), NELogicalOr::configure(), NEIm2ColKernel::configure(), CLDepthwiseConvolutionLayerNativeKernel::configure(), CLFastCorners::configure(), GCFullyConnectedLayer::configure(), NEGEMM::configure(), CLCannyEdge::configure(), CLSoftmaxLayerGeneric< IS_LOG >::configure(), CLDirectConvolutionLayerKernel::configure(), NELaplacianReconstruct::configure(), NEGEMMTranspose1xWKernel::configure(), NEHarrisScoreKernel< block_size >::configure(), CLGEMMLowpOffsetContributionOutputStageKernel::configure(), NEHOGMultiDetection::configure(), NEGaussianPyramidVertKernel::configure(), CLWeightsReshapeKernel::configure(), NEGEMMLowpOffsetContributionOutputStageKernel::configure(), CLCropResize::configure(), NEHarrisCorners::configure(), NEGEMMLowpMatrixMultiplyCore::configure(), NEGaussian5x5VertKernel::configure(), GCLogits1DNormKernel::configure(), NELSTMLayer::configure(), NELSTMLayerQuantized::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), CLLaplacianReconstruct::configure(), CLGEMMReshapeRHSMatrixKernel::configure(), CLIm2ColKernel::configure(), CLWinogradConvolutionLayer::configure(), NEDeconvolutionLayer::configure(), CLHistogramBorderKernel::configure(), CLGaussianPyramidVertKernel::configure(), CLLogicalOr::configure(), CLLogicalAnd::configure(), NESlice::configure(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::configure(), CLComparisonStatic< COP >::configure(), NEAccumulateWeightedKernel::configure(), CLHarrisCorners::configure(), NEGEMMLowpMatrixAReductionKernel::configure(), NEConvolutionLayer::configure(), CLArithmeticAddition::configure(), CLFFTConvolutionLayer::configure(), CLGEMMLowpMatrixAReductionKernel::configure(), NEElementwiseMin::configure(), NEGaussianPyramidHalf::configure(), CLPReluLayer::configure(), NEStridedSlice::configure(), CLGenerateProposalsLayer::configure(), NESobel5x5VertKernel::configure(), CLHOGBlockNormalizationKernel::configure(), CLGaussianPyramidHalf::configure(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::configure(), CLEdgeNonMaxSuppressionKernel::configure(), GCConvolutionLayer::configure(), CLMinMaxLocationKernel::configure(), CLHOGMultiDetection::configure(), CLExpLayer::configure(), CLGEMMDeconvolutionLayer::configure(), CLDirectDeconvolutionLayer::configure(), CLSeparableConvolutionHorKernel< matrix_size >::configure(), NESobel7x7VertKernel::configure(), NEConvolutionSquare< matrix_size >::configure(), CLSlice::configure(), NEQLSTMLayer::configure(), CLOpticalFlow::configure(), NEHOGBlockNormalizationKernel::configure(), CLLSTMLayerQuantized::configure(), CLCopyToArrayKernel::configure(), NELogicalNot::configure(), CLSobel5x5VertKernel::configure(), CLSobel7x7VertKernel::configure(), NEEdgeNonMaxSuppressionKernel::configure(), CLGEMMMatrixMultiplyReshapedKernel::configure(), CLConvolutionSquare< matrix_size >::configure(), CLConvolutionLayer::configure(), CLGaussianPyramidOrb::configure(), NEMinMaxLocationKernel::configure(), CLLogits1DNormKernel::configure(), NESeparableConvolutionHorKernel< matrix_size >::configure(), CLLKTrackerStage0Kernel::configure(), NEGaussianPyramidOrb::configure(), NEFullyConnectedLayer::configure(), CLLSTMLayer::configure(), NEElementwiseSquaredDiff::configure(), CLSeparableConvolutionVertKernel< matrix_size >::configure(), CLGEMMLowpMatrixBReductionKernel::configure(), CLNegLayer::configure(), CLGEMM::configure(), CLQLSTMLayer::configure(), NEGEMMLowpMatrixBReductionKernel::configure(), CLEdgeTraceKernel::configure(), NEAccumulateSquaredKernel::configure(), NEPixelWiseMultiplication::configure(), NEEdgeTraceKernel::configure(), CLFullyConnectedLayer::configure(), NESeparableConvolutionVertKernel< matrix_size >::configure(), NEGEMMConvolutionLayer::configure(), CLLKTrackerStage1Kernel::configure(), NEElementwiseDivision::configure(), CLSinLayer::configure(), CLConvolutionRectangleKernel::configure(), CLArithmeticSubtraction::configure(), CLPixelWiseMultiplication::configure(), CLGEMMConvolutionLayer::configure(), NEComplexPixelWiseMultiplication::configure(), CLLogLayer::configure(), NEElementwisePower::configure(), NEConvolutionRectangleKernel::configure(), CLArithmeticDivision::configure(), NEGEMMLowpOutputStage::configure(), CLAbsLayer::configure(), CLComplexPixelWiseMultiplication::configure(), NEElementwiseComparison::configure(), CLRoundLayer::configure(), NEElementwiseComparisonStatic< op >::configure(), CLElementwiseMax::configure(), NEWinogradLayerTransformOutputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::configure(), CLElementwiseMin::configure(), CLElementwiseSquaredDiff::configure(), CLElementwisePower::configure(), NECropKernel::configure_output_shape(), ITensor::copy_from(), arm_compute::graph::backends::detail::create_convolution_layer< GCConvolutionLayerFunctions, GCTargetInfo >(), arm_compute::graph::backends::detail::create_depthwise_convolution_layer< GCDepthwiseConvolutionLayerFunctions, GCTargetInfo >(), Accessor::data_layout(), Accessor::data_type(), DetectionOutputAccessor::DetectionOutputAccessor(), 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(), ICPPSimpleKernel::ICPPSimpleKernel(), Iterator::Iterator(), IGCKernel::kernel(), arm_compute::cpu::nearest_neon_scale(), NEGatherKernel::NEGatherKernel(), arm_compute::cpu::neon_softmax_logits_1d_float(), NEPadLayer::NEPadLayer(), Accessor::num_channels(), Accessor::num_elements(), NumPyAccessor::NumPyAccessor(), get_tensor_info_t< ITensorInfo * >::operator()(), VerifyAccessor< D >::output_shape(), Accessor::padding(), arm_compute::cpu::poolingMxN_fp32_neon_nhwc(), arm_compute::cpu::poolingMxN_q8_neon_nhwc(), CaffePreproccessor::preprocess(), TFPreproccessor::preprocess(), ITensor::ptr_to_element(), arm_compute::cpu::qasymm8_neon_activation(), arm_compute::cpu::qasymm8_signed_neon_activation(), arm_compute::cpu::qsymm16_neon_activation(), Accessor::quantization_info(), RandomAccessor::RandomAccessor(), NEMinMaxKernel::reset(), CLMinMaxLayerKernel::reset(), NEMinMaxLayerKernel::reset(), arm_compute::roi_align_1x1(), arm_compute::roi_align_1x1_qasymm8(), GCDepthwiseConvolutionLayer3x3Kernel::run(), CPPUpsampleKernel::run(), CLHistogramKernel::run(), NEHOGOrientationBinningKernel::run(), GCActivationLayerKernel::run(), CLMinMaxKernel::run(), NENonMaximaSuppression3x3Kernel::run(), CPPDetectionOutputLayer::run(), NEDequantizationLayerKernel::run(), NEMeanStdDevKernel::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run(), NEHOGDetectorKernel::run(), GCDirectConvolutionLayerKernel< kernel_size >::run(), NETileKernel::run(), NESpaceToDepthLayerKernel::run(), NEChannelShuffleLayerKernel::run(), NEROIPoolingLayerKernel::run(), NEDepthToSpaceLayerKernel::run(), NEReverseKernel::run(), CLDequantizationLayerKernel::run(), GCPoolingLayerKernel::run(), GCArithmeticAdditionKernel::run(), NEComputeAllAnchorsKernel::run(), CPPTopKVKernel::run(), NEReorgLayerKernel::run(), GCNormalizePlanarYUVLayerKernel::run(), GCTensorShiftKernel::run(), CLDeconvolutionLayerUpsampleKernel::run(), CLQLSTMLayerNormalizationKernel::run(), NEConvertFullyConnectedWeightsKernel::run(), CLComparisonKernel::run(), CLIntegralImageVertKernel::run(), NEFillBorderKernel::run(), NEMinMaxLayerKernel::run(), CLMeanStdDevNormalizationKernel::run(), CLInstanceNormalizationLayerKernel::run(), GCWeightsReshapeKernel::run(), GCCol2ImKernel::run(), NEFFTRadixStageKernel::run(), NEGEMMLowpMatrixMultiplyKernel::run(), NEBoundingBoxTransformKernel::run(), CLROIPoolingLayerKernel::run(), GCGEMMMatrixMultiplyKernel::run(), NEStackLayerKernel::run(), GCIm2ColKernel::run(), CLMeanStdDevKernel::run(), NEGEMMMatrixMultiplyKernel::run(), NEWinogradConvolutionLayer::run(), NEDirectConvolutionLayerKernel::run(), CLPriorBoxLayerKernel::run(), GCBatchNormalizationLayerKernel::run(), CPPDetectionPostProcessLayer::run(), NEDepthConvertLayerKernel::run(), NECannyEdge::run(), CLReductionOperationKernel::run(), NEBatchToSpaceLayerKernel::run(), NEROIAlignLayerKernel::run(), NECropKernel::run(), NEGEMMLowpOffsetContributionKernel::run(), NEBatchNormalizationLayerKernel::run(), CLStackLayerKernel::run(), CLLogits1DMaxShiftExpSumKernel::run(), CLGEMMLowpMatrixMultiplyNativeKernel::run(), CLArgMinMaxLayerKernel::run(), CLGEMMReshapeLHSMatrixKernel::run(), NESpaceToBatchLayerKernel::run(), NEDepthwiseConvolutionLayerNativeKernel::run(), CLCol2ImKernel::run(), CLROIAlignLayerKernel::run(), NEWeightsReshapeKernel::run(), CLWinogradInputTransformKernel::run(), CLWinogradFilterTransformKernel::run(), CLGEMMMatrixMultiplyKernel::run(), CLDirectConvolutionLayerKernel::run(), CLGEMMLowpMatrixMultiplyReshapedKernel::run(), CLColorConvertKernel::run(), CLGEMMMatrixMultiplyNativeKernel::run(), CLWeightsReshapeKernel::run(), CLWinogradOutputTransformKernel::run(), CLDepthwiseConvolutionLayerNativeKernel::run(), NESobel7x7VertKernel::run(), NEGEMMLowpOffsetContributionOutputStageKernel::run(), NEGEMMLowpMatrixAReductionKernel::run(), CLIm2ColKernel::run(), NEHOGBlockNormalizationKernel::run(), NEEdgeNonMaxSuppressionKernel::run(), CLGEMMLowpMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedOnlyRHSKernel::run(), CLGEMMMatrixMultiplyReshapedKernel::run(), NEEdgeTraceKernel::run(), CLGEMM::run(), NEGEMMLowpMatrixBReductionKernel::run(), NEWinogradLayerTransformInputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::run(), NEGEMMConvolutionLayer::run(), NEConvolutionRectangleKernel::run(), NEWinogradLayerTransformOutputKernel< T, OutputTileRows, OutputTileCols, KernelRows, KernelCols >::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), CpuPoolingKernel::run_op(), CpuAddKernel::run_op(), NEFillBorderKernel::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(), arm_compute::cpu::sub_u8_u8_s16_neon(), SubTensor::SubTensor(), arm_compute::to_string(), TopNPredictionsAccessor::TopNPredictionsAccessor(), NEComputeAllAnchorsKernel::validate(), NEQuantizationLayerKernel::validate(), NEFFTDigitReverseKernel::validate(), NEConvertFullyConnectedWeightsKernel::validate(), NEBoundingBoxTransformKernel::validate(), NEGEMMInterleave4x4Kernel::validate(), CLReductionOperation::validate(), NEGEMMLowpMatrixAReductionKernel::validate(), and NEGEMMLowpMatrixBReductionKernel::validate().

◆ info() [2/2]

virtual ITensorInfo* info ( )
pure virtual

Interface to be implemented by the child class to return the tensor's metadata.

Returns
A pointer to the tensor's metadata.

Implemented in CLSubTensor, GCTensor, CLTensor, SubTensor, OperatorTensor, and Tensor.

◆ is_used()

◆ mark_as_unused()

◆ print()

void print ( std::ostream &  s,
IOFormatInfo  io_fmt = IOFormatInfo() 
) const

Print a tensor to a given stream using user defined formatting information.

Parameters
sOutput stream
io_fmtFormat information

Referenced by NumPyAccessor::access_tensor(), ITensor::copy_from(), arm_compute::graph::execute_task(), main(), arm_compute::test::print_tensor(), and ITensor::ptr_to_element().

◆ ptr_to_element()

uint8_t* ptr_to_element ( const Coordinates id) const
inline

Return a pointer to the element at the passed coordinates.

Parameters
[in]idCoordinates of the element
Returns
Pointer to the requested element

Definition at line 63 of file ITensor.h.

References ITensor::buffer(), ITensor::copy_from(), ITensor::info(), ITensor::is_used(), ITensor::mark_as_unused(), ITensorInfo::offset_element_in_bytes(), ITensor::print(), and arm_compute::test::validation::src.

Referenced by NENonLinearFilterKernel::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), NECropKernel::configure_output_shape(), arm_compute::test::validation::DATA_TEST_CASE(), arm_compute::cpu::nearest_neon_scale(), NEGatherKernel::NEGatherKernel(), GCAccessor::operator()(), Accessor::operator()(), CLAccessor::operator()(), arm_compute::roi_align_1x1(), arm_compute::roi_align_1x1_qasymm8(), NEIntegralImageKernel::run(), NEFastCornersKernel::run(), CPPDetectionOutputLayer::run(), NETileKernel::run(), NEROIPoolingLayerKernel::run(), NESpaceToDepthLayerKernel::run(), NEDepthToSpaceLayerKernel::run(), NEScharr3x3Kernel::run(), NESobel3x3Kernel::run(), CPPNonMaximumSuppressionKernel::run(), CPPDetectionPostProcessLayer::run(), NEROIAlignLayerKernel::run(), NEBatchToSpaceLayerKernel::run(), NECropKernel::run(), NECropResize::run(), NESpaceToBatchLayerKernel::run(), NEWeightsReshapeKernel::run(), NESobel5x5VertKernel::run(), CPPBoxWithNonMaximaSuppressionLimitKernel::run_nmslimit(), NEFillBorderKernel::run_op(), arm_compute::run_reverse(), and NEComputeAllAnchorsKernel::validate().

64  {
65  return buffer() + info()->offset_element_in_bytes(id);
66  }
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...
virtual uint8_t * buffer() const =0
Interface to be implemented by the child class to return a pointer to CPU memory. ...
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor&#39;s metadata.

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