Compute Library
 19.08
arm_compute::test::validation::reference Namespace Reference

Enumerations

enum  ArithmeticOperation { ADD, SUB }
 Arithmetic operation types. More...
 
enum  FFTDirection { Forward, Inverse }
 
enum  WinogradTransformType { INPUT, FILTER, OUTPUT }
 Winograd transform type. More...
 

Functions

template<typename T >
SimpleTensor< T > absolute_difference (const SimpleTensor< T > &src1, const SimpleTensor< T > &src2, DataType dst_data_type)
 
template SimpleTensor< uint8_t > absolute_difference (const SimpleTensor< uint8_t > &src1, const SimpleTensor< uint8_t > &src2, DataType dst_data_type)
 
template SimpleTensor< int16_t > absolute_difference (const SimpleTensor< int16_t > &src1, const SimpleTensor< int16_t > &src2, DataType dst_data_type)
 
template SimpleTensor< int8_t > absolute_difference (const SimpleTensor< int8_t > &src1, const SimpleTensor< int8_t > &src2, DataType dst_data_type)
 
template<typename T1 , typename T2 >
SimpleTensor< T2 > accumulate (const SimpleTensor< T1 > &src, DataType output_data_type)
 
template<typename T1 , typename T2 >
SimpleTensor< T2 > accumulate_weighted (const SimpleTensor< T1 > &src, float alpha, DataType output_data_type)
 
template<typename T1 , typename T2 >
SimpleTensor< T2 > accumulate_squared (const SimpleTensor< T1 > &src, uint32_t shift, DataType output_data_type)
 
template SimpleTensor< int16_t > accumulate (const SimpleTensor< uint8_t > &src, DataType output_data_type)
 
template SimpleTensor< uint8_t > accumulate_weighted (const SimpleTensor< uint8_t > &src, float alpha, DataType output_data_type)
 
template SimpleTensor< int16_t > accumulate_squared (const SimpleTensor< uint8_t > &src, uint32_t shift, DataType output_data_type)
 
template<typename T >
SimpleTensor< T > activation_layer (const SimpleTensor< T > &src, ActivationLayerInfo info, const QuantizationInfo &oq_info)
 
template<>
SimpleTensor< uint8_t > activation_layer< uint8_t > (const SimpleTensor< uint8_t > &src, ActivationLayerInfo info, const QuantizationInfo &oq_info)
 
template<>
SimpleTensor< int16_t > activation_layer< int16_t > (const SimpleTensor< int16_t > &src, ActivationLayerInfo info, const QuantizationInfo &oq_info)
 
template SimpleTensor< float > activation_layer (const SimpleTensor< float > &src, ActivationLayerInfo info, const QuantizationInfo &oq_info)
 
template SimpleTensor< halfactivation_layer (const SimpleTensor< half > &src, ActivationLayerInfo info, const QuantizationInfo &oq_info)
 
template<typename T >
activate_float (T x, T a, T b, ActivationLayerInfo::ActivationFunction activation)
 
template<typename T >
SimpleTensor< T > arithmetic_division (const SimpleTensor< T > &src1, const SimpleTensor< T > &src2, DataType data_type)
 
template SimpleTensor< halfarithmetic_division (const SimpleTensor< half > &src1, const SimpleTensor< half > &src2, DataType data_type)
 
template SimpleTensor< float > arithmetic_division (const SimpleTensor< float > &src1, const SimpleTensor< float > &src2, DataType data_type)
 
template<typename T >
SimpleTensor< T > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< T > &src1, const SimpleTensor< T > &src2, SimpleTensor< T > &dst, ConvertPolicy convert_policy)
 
template<>
SimpleTensor< uint8_t > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< uint8_t > &src1, const SimpleTensor< uint8_t > &src2, SimpleTensor< uint8_t > &dst, ConvertPolicy convert_policy)
 
template<>
SimpleTensor< int16_t > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< int16_t > &src1, const SimpleTensor< int16_t > &src2, SimpleTensor< int16_t > &dst, ConvertPolicy convert_policy)
 
template SimpleTensor< int8_t > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< int8_t > &src1, const SimpleTensor< int8_t > &src2, SimpleTensor< int8_t > &dst, ConvertPolicy convert_policy)
 
template SimpleTensor< halfarithmetic_operation (ArithmeticOperation op, const SimpleTensor< half > &src1, const SimpleTensor< half > &src2, SimpleTensor< half > &dst, ConvertPolicy convert_policy)
 
template SimpleTensor< float > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< float > &src1, const SimpleTensor< float > &src2, SimpleTensor< float > &dst, ConvertPolicy convert_policy)
 
template<typename T >
SimpleTensor< T > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< T > &src1, const SimpleTensor< T > &src2, DataType dst_data_type, ConvertPolicy convert_policy)
 
template SimpleTensor< int16_t > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< int16_t > &src1, const SimpleTensor< int16_t > &src2, DataType dst_data_type, ConvertPolicy convert_policy)
 
template SimpleTensor< int8_t > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< int8_t > &src1, const SimpleTensor< int8_t > &src2, DataType dst_data_type, ConvertPolicy convert_policy)
 
template SimpleTensor< halfarithmetic_operation (ArithmeticOperation op, const SimpleTensor< half > &src1, const SimpleTensor< half > &src2, DataType dst_data_type, ConvertPolicy convert_policy)
 
template SimpleTensor< float > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< float > &src1, const SimpleTensor< float > &src2, DataType dst_data_type, ConvertPolicy convert_policy)
 
template<typename T , typename std::enable_if< is_floating_point< T >::value, int >::type * >
SimpleTensor< T > batch_normalization_layer (const SimpleTensor< T > &src, const SimpleTensor< T > &mean, const SimpleTensor< T > &var, const SimpleTensor< T > &beta, const SimpleTensor< T > &gamma, float epsilon, ActivationLayerInfo act_info)
 
template SimpleTensor< float > batch_normalization_layer (const SimpleTensor< float > &src, const SimpleTensor< float > &mean, const SimpleTensor< float > &var, const SimpleTensor< float > &beta, const SimpleTensor< float > &gamma, float epsilon, ActivationLayerInfo act_info)
 
template SimpleTensor< halfbatch_normalization_layer (const SimpleTensor< half > &src, const SimpleTensor< half > &mean, const SimpleTensor< half > &var, const SimpleTensor< half > &beta, const SimpleTensor< half > &gamma, float epsilon, ActivationLayerInfo act_info)
 
template<typename T >
SimpleTensor< T > batch_to_space (const SimpleTensor< T > &src, const SimpleTensor< int32_t > &block_shape, const TensorShape &dst_shape)
 
template SimpleTensor< float > batch_to_space (const SimpleTensor< float > &src, const SimpleTensor< int32_t > &block_shape, const TensorShape &dst_shape)
 
template SimpleTensor< halfbatch_to_space (const SimpleTensor< half > &src, const SimpleTensor< int32_t > &block_shape, const TensorShape &dst_shape)
 
template<typename T >
SimpleTensor< T > bitwise_and (const SimpleTensor< T > &src1, const SimpleTensor< T > &src2)
 
template SimpleTensor< uint8_t > bitwise_and (const SimpleTensor< uint8_t > &src1, const SimpleTensor< uint8_t > &src2)
 
template<typename T >
SimpleTensor< T > bitwise_not (const SimpleTensor< T > &src)
 
template SimpleTensor< uint8_t > bitwise_not (const SimpleTensor< uint8_t > &src)
 
template<typename T >
SimpleTensor< T > bitwise_or (const SimpleTensor< T > &src1, const SimpleTensor< T > &src2)
 
template SimpleTensor< uint8_t > bitwise_or (const SimpleTensor< uint8_t > &src1, const SimpleTensor< uint8_t > &src2)
 
template<typename T >
SimpleTensor< T > bitwise_xor (const SimpleTensor< T > &src1, const SimpleTensor< T > &src2)
 
template SimpleTensor< uint8_t > bitwise_xor (const SimpleTensor< uint8_t > &src1, const SimpleTensor< uint8_t > &src2)
 
template<typename T >
SimpleTensor< T > bounding_box_transform (const SimpleTensor< T > &boxes, const SimpleTensor< T > &deltas, const BoundingBoxTransformInfo &info)
 
template SimpleTensor< float > bounding_box_transform (const SimpleTensor< float > &boxes, const SimpleTensor< float > &deltas, const BoundingBoxTransformInfo &info)
 
template SimpleTensor< halfbounding_box_transform (const SimpleTensor< half > &boxes, const SimpleTensor< half > &deltas, const BoundingBoxTransformInfo &info)
 
template<typename T >
SimpleTensor< T > box3x3 (const SimpleTensor< T > &src, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > box3x3 (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< T > canny_edge_detector (const SimpleTensor< T > &src, int32_t upper_thresh, int32_t lower_thresh, int gradient_size, MagnitudeType norm_type, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > canny_edge_detector (const SimpleTensor< uint8_t > &src, int32_t upper_thresh, int32_t lower_thresh, int gradient_size, MagnitudeType norm_type, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
std::vector< SimpleTensor< T > > channel_combine (const TensorShape &shape, const std::vector< SimpleTensor< T >> &image_planes, Format format)
 
template std::vector< SimpleTensor< uint8_t > > channel_combine (const TensorShape &shape, const std::vector< SimpleTensor< uint8_t >> &image_planes, Format format)
 
template<typename T >
SimpleTensor< uint8_t > channel_extract (const TensorShape &shape, const std::vector< SimpleTensor< T >> &tensor_planes, Format format, Channel channel)
 
template SimpleTensor< uint8_t > channel_extract (const TensorShape &shape, const std::vector< SimpleTensor< uint8_t >> &tensor_planes, Format format, Channel channel)
 
template<typename T >
SimpleTensor< T > channel_shuffle (const SimpleTensor< T > &src, int num_groups)
 
template SimpleTensor< uint8_t > channel_shuffle (const SimpleTensor< uint8_t > &src, int num_groups)
 
template SimpleTensor< uint16_t > channel_shuffle (const SimpleTensor< uint16_t > &src, int num_groups)
 
template SimpleTensor< uint32_t > channel_shuffle (const SimpleTensor< uint32_t > &src, int num_groups)
 
template SimpleTensor< halfchannel_shuffle (const SimpleTensor< half > &src, int num_groups)
 
template SimpleTensor< float > channel_shuffle (const SimpleTensor< float > &src, int num_groups)
 
template<typename T >
SimpleTensor< T > col2im (const SimpleTensor< T > &src, const TensorShape &dst_shape, unsigned int num_groups)
 
template SimpleTensor< float > col2im (const SimpleTensor< float > &src, const TensorShape &dst_shape, unsigned int num_groups)
 
template SimpleTensor< halfcol2im (const SimpleTensor< half > &src, const TensorShape &dst_shape, unsigned int num_groups)
 
template SimpleTensor< uint8_t > col2im (const SimpleTensor< uint8_t > &src, const TensorShape &dst_shape, unsigned int num_groups)
 
template<typename T >
std::vector< SimpleTensor< T > > color_convert (const TensorShape &shape, const std::vector< SimpleTensor< T >> &tensor_planes, Format src_format, Format dst_format)
 
template std::vector< SimpleTensor< uint8_t > > color_convert (const TensorShape &shape, const std::vector< SimpleTensor< uint8_t >> &tensor_planes, Format src_format, Format dst_format)
 
template<typename T >
SimpleTensor< uint8_t > compare (ComparisonOperation op, const SimpleTensor< T > &src1, const SimpleTensor< T > &src2)
 
template<>
SimpleTensor< uint8_t > compare (ComparisonOperation op, const SimpleTensor< uint8_t > &src1, const SimpleTensor< uint8_t > &src2)
 
template SimpleTensor< uint8_t > compare (ComparisonOperation op, const SimpleTensor< half > &src1, const SimpleTensor< half > &src2)
 
template SimpleTensor< uint8_t > compare (ComparisonOperation op, const SimpleTensor< float > &src1, const SimpleTensor< float > &src2)
 
template<typename T >
SimpleTensor< T > compute_all_anchors (const SimpleTensor< T > &anchors, const ComputeAnchorsInfo &info)
 
template SimpleTensor< float > compute_all_anchors (const SimpleTensor< float > &anchors, const ComputeAnchorsInfo &info)
 
template SimpleTensor< halfcompute_all_anchors (const SimpleTensor< half > &anchors, const ComputeAnchorsInfo &info)
 
template<typename T >
SimpleTensor< T > concatenate_layer (std::vector< SimpleTensor< T >> &srcs, SimpleTensor< T > &dst, unsigned int axis)
 
template SimpleTensor< float > concatenate_layer (std::vector< SimpleTensor< float >> &srcs, SimpleTensor< float > &dst, unsigned int axis)
 
template SimpleTensor< halfconcatenate_layer (std::vector< SimpleTensor< half >> &srcs, SimpleTensor< half > &dst, unsigned int axis)
 
template SimpleTensor< uint8_t > concatenate_layer (std::vector< SimpleTensor< uint8_t >> &srcs, SimpleTensor< uint8_t > &dst, unsigned int axis)
 
template<typename T >
SimpleTensor< T > convert_fully_connected_weights (const SimpleTensor< T > &src, const TensorShape &original_input_shape, const DataLayout training_data_layout)
 
template SimpleTensor< uint8_t > convert_fully_connected_weights (const SimpleTensor< uint8_t > &src, const TensorShape &original_input_shape, const DataLayout training_data_layout)
 
template SimpleTensor< halfconvert_fully_connected_weights (const SimpleTensor< half > &src, const TensorShape &original_input_shape, const DataLayout training_data_layout)
 
template SimpleTensor< float > convert_fully_connected_weights (const SimpleTensor< float > &src, const TensorShape &original_input_shape, const DataLayout training_data_layout)
 
template<typename T >
SimpleTensor< T > convolution (const SimpleTensor< uint8_t > &src, DataType output_data_type, const int16_t *conv, uint32_t scale, BorderMode border_mode, uint8_t constant_border_value, const unsigned int width, const unsigned int height)
 
template<typename T , typename TB >
SimpleTensor< T > convolution_layer_nchw (const SimpleTensor< T > &src, const SimpleTensor< T > &weights, const SimpleTensor< TB > &bias, SimpleTensor< T > &dst, const PadStrideInfo &info, const Size2D &dilation, unsigned int num_groups)
 
template<typename T , typename TB >
SimpleTensor< T > convolution_layer (const SimpleTensor< T > &src, const SimpleTensor< T > &weights, const SimpleTensor< TB > &bias, const TensorShape &output_shape, const PadStrideInfo &info, const Size2D &dilation, unsigned int num_groups, QuantizationInfo out_quant_info)
 
template SimpleTensor< float > convolution_layer (const SimpleTensor< float > &src, const SimpleTensor< float > &weights, const SimpleTensor< float > &bias, const TensorShape &output_shape, const PadStrideInfo &info, const Size2D &dilation, unsigned int num_groups, QuantizationInfo out_quant_info)
 
template SimpleTensor< halfconvolution_layer (const SimpleTensor< half > &src, const SimpleTensor< half > &weights, const SimpleTensor< half > &bias, const TensorShape &output_shape, const PadStrideInfo &info, const Size2D &dilation, unsigned int num_groups, QuantizationInfo out_quant_info)
 
template SimpleTensor< uint8_t > convolution_layer (const SimpleTensor< uint8_t > &src, const SimpleTensor< uint8_t > &weights, const SimpleTensor< int32_t > &bias, const TensorShape &output_shape, const PadStrideInfo &info, const Size2D &dilation, unsigned int num_groups, QuantizationInfo out_quant_info)
 
template<typename T >
SimpleTensor< T > copy (const SimpleTensor< T > &src, const TensorShape &output_shape)
 
template SimpleTensor< uint8_t > copy (const SimpleTensor< uint8_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< int8_t > copy (const SimpleTensor< int8_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< uint16_t > copy (const SimpleTensor< uint16_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< int16_t > copy (const SimpleTensor< int16_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< uint32_t > copy (const SimpleTensor< uint32_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< int32_t > copy (const SimpleTensor< int32_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< halfcopy (const SimpleTensor< half > &src, const TensorShape &output_shape)
 
template SimpleTensor< float > copy (const SimpleTensor< float > &src, const TensorShape &output_shape)
 
template<typename T >
SimpleTensor< float > crop_and_resize (const SimpleTensor< T > &src, const SimpleTensor< float > &boxes, SimpleTensor< int32_t > box_ind, Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value)
 
template SimpleTensor< float > crop_and_resize (const SimpleTensor< float > &src, const SimpleTensor< float > &boxes, SimpleTensor< int32_t > box_ind, Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value)
 
template SimpleTensor< float > crop_and_resize (const SimpleTensor< uint16_t > &src, const SimpleTensor< float > &boxes, SimpleTensor< int32_t > box_ind, Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value)
 
template SimpleTensor< float > crop_and_resize (const SimpleTensor< uint32_t > &src, const SimpleTensor< float > &boxes, SimpleTensor< int32_t > box_ind, Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value)
 
template SimpleTensor< float > crop_and_resize (const SimpleTensor< int16_t > &src, const SimpleTensor< float > &boxes, SimpleTensor< int32_t > box_ind, Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value)
 
template SimpleTensor< float > crop_and_resize (const SimpleTensor< int32_t > &src, const SimpleTensor< float > &boxes, SimpleTensor< int32_t > box_ind, Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value)
 
template SimpleTensor< float > crop_and_resize (const SimpleTensor< half > &src, const SimpleTensor< float > &boxes, SimpleTensor< int32_t > box_ind, Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value)
 
template<typename T , typename TB >
SimpleTensor< T > deconvolution_layer (const SimpleTensor< T > &src, const SimpleTensor< T > &weights, const SimpleTensor< TB > &bias, const TensorShape &output_shape, const PadStrideInfo &info)
 Deconvolution reference implementation. More...
 
template SimpleTensor< uint8_t > deconvolution_layer (const SimpleTensor< uint8_t > &src, const SimpleTensor< uint8_t > &weights, const SimpleTensor< int32_t > &bias, const TensorShape &output_shape, const PadStrideInfo &info)
 
template SimpleTensor< float > deconvolution_layer (const SimpleTensor< float > &src, const SimpleTensor< float > &weights, const SimpleTensor< float > &bias, const TensorShape &output_shape, const PadStrideInfo &info)
 
template SimpleTensor< halfdeconvolution_layer (const SimpleTensor< half > &src, const SimpleTensor< half > &weights, const SimpleTensor< half > &bias, const TensorShape &output_shape, const PadStrideInfo &info)
 
template<typename T >
SimpleTensor< T > depthconcatenate_layer (const std::vector< SimpleTensor< T >> &srcs, SimpleTensor< T > &dst)
 
template SimpleTensor< uint8_t > depthconcatenate_layer (const std::vector< SimpleTensor< uint8_t >> &srcs, SimpleTensor< uint8_t > &dst)
 
template SimpleTensor< float > depthconcatenate_layer (const std::vector< SimpleTensor< float >> &srcs, SimpleTensor< float > &dst)
 
template SimpleTensor< halfdepthconcatenate_layer (const std::vector< SimpleTensor< half >> &srcs, SimpleTensor< half > &dst)
 
template<typename T1 , typename T2 , typename std::enable_if< std::is_integral< T1 >::value &&!std::is_same< T1, T2 >::value, int >::type >
SimpleTensor< T2 > depth_convert (const SimpleTensor< T1 > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template SimpleTensor< int8_t > depth_convert (const SimpleTensor< uint8_t > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template SimpleTensor< uint8_t > depth_convert (const SimpleTensor< int8_t > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template SimpleTensor< uint8_t > depth_convert (const SimpleTensor< uint16_t > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template SimpleTensor< uint8_t > depth_convert (const SimpleTensor< int16_t > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template SimpleTensor< uint8_t > depth_convert (const SimpleTensor< uint32_t > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template SimpleTensor< uint8_t > depth_convert (const SimpleTensor< int32_t > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template SimpleTensor< uint8_t > depth_convert (const SimpleTensor< half > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template SimpleTensor< uint8_t > depth_convert (const SimpleTensor< float > &src, DataType dt_out, ConvertPolicy policy, uint32_t shift)
 
template<typename T >
SimpleTensor< T > depth_to_space (const SimpleTensor< T > &src, const TensorShape &dst_shape, int32_t block_shape)
 
template SimpleTensor< float > depth_to_space (const SimpleTensor< float > &src, const TensorShape &dst_shape, int32_t block_shape)
 
template SimpleTensor< halfdepth_to_space (const SimpleTensor< half > &src, const TensorShape &dst_shape, int32_t block_shape)
 
template<typename T , typename TB >
SimpleTensor< T > depthwise_convolution (const SimpleTensor< T > &src, const SimpleTensor< T > &weights, const SimpleTensor< TB > &biases, const TensorShape &dst_shape, const PadStrideInfo &conv_info, unsigned int depth_multiplier, const Size2D &dilation, const QuantizationInfo &out_quant_info)
 Perform a depthwise convolution. More...
 
template<>
SimpleTensor< uint8_t > depthwise_convolution (const SimpleTensor< uint8_t > &src, const SimpleTensor< uint8_t > &weights, const SimpleTensor< int32_t > &biases, const TensorShape &dst_shape, const PadStrideInfo &conv_info, unsigned int depth_multiplier, const Size2D &dilation, const QuantizationInfo &out_quant_info)
 
template SimpleTensor< float > depthwise_convolution (const SimpleTensor< float > &src, const SimpleTensor< float > &weights, const SimpleTensor< float > &biases, const TensorShape &dst_shape, const PadStrideInfo &conv_info, unsigned int depth_multiplier, const Size2D &dilation, const QuantizationInfo &out_quant_info)
 
template SimpleTensor< halfdepthwise_convolution (const SimpleTensor< half > &src, const SimpleTensor< half > &weights, const SimpleTensor< half > &biases, const TensorShape &dst_shape, const PadStrideInfo &conv_info, unsigned int depth_multiplier, const Size2D &dilation, const QuantizationInfo &out_quant_info)
 
template<typename T >
SimpleTensor< T > depthwise_separable_convolution_layer (const SimpleTensor< T > &src, const SimpleTensor< T > &depthwise_weights, const SimpleTensor< T > &depthwise_biases, const TensorShape &depthwise_out_shape, const SimpleTensor< T > &pointwise_weights, const SimpleTensor< T > &pointwise_biases, const TensorShape &dst_shape, const PadStrideInfo &depthwise_conv_info, const PadStrideInfo &pointwise_conv_info)
 
template SimpleTensor< float > depthwise_separable_convolution_layer (const SimpleTensor< float > &in, const SimpleTensor< float > &depthwise_weights, const SimpleTensor< float > &depthwise_biases, const TensorShape &depthwise_out_shape, const SimpleTensor< float > &pointwise_weights, const SimpleTensor< float > &pointwise_biases, const TensorShape &dst_shape, const PadStrideInfo &depthwise_conv_info, const PadStrideInfo &pointwise_conv_info)
 
template<typename TOut , typename TIn >
SimpleTensor< TOut > dequantization_layer (const SimpleTensor< TIn > &src)
 
template SimpleTensor< halfdequantization_layer (const SimpleTensor< uint8_t > &src)
 
template SimpleTensor< halfdequantization_layer (const SimpleTensor< int8_t > &src)
 
template SimpleTensor< halfdequantization_layer (const SimpleTensor< int16_t > &src)
 
template<typename T , typename U >
std::pair< SimpleTensor< T >, SimpleTensor< T > > derivative (const SimpleTensor< U > &src, BorderMode border_mode, uint8_t constant_border_value, GradientDimension gradient_dimension)
 
template std::pair< SimpleTensor< int16_t >, SimpleTensor< int16_t > > derivative (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value, GradientDimension gradient_dimension)
 
template<typename T >
SimpleTensor< T > rdft_1d (const SimpleTensor< T > &src)
 Performs an one dimensional DFT on a real input. More...
 
template<typename T >
SimpleTensor< T > ridft_1d (const SimpleTensor< T > &src, bool is_odd=false)
 Performs an one dimensional inverse DFT on a real input. More...
 
template<typename T >
SimpleTensor< T > dft_1d (const SimpleTensor< T > &src, FFTDirection direction)
 Performs an one dimensional DFT on a complex input. More...
 
template<typename T >
SimpleTensor< T > rdft_2d (const SimpleTensor< T > &src)
 Performs a two dimensional DFT on a real input. More...
 
template<typename T >
SimpleTensor< T > ridft_2d (const SimpleTensor< T > &src, bool is_odd=false)
 Performs a two dimensional inverse DFT on a real input. More...
 
template<typename T >
SimpleTensor< T > dft_2d (const SimpleTensor< T > &src, FFTDirection direction)
 Performs a two dimensional DFT on a complex input. More...
 
template<typename T >
SimpleTensor< T > conv2d_dft (const SimpleTensor< T > &src, const SimpleTensor< T > &w, const PadStrideInfo &conv_info)
 Performs and DFT based convolution on a real input. More...
 
template SimpleTensor< float > rdft_1d (const SimpleTensor< float > &src)
 
template SimpleTensor< float > ridft_1d (const SimpleTensor< float > &src, bool is_odd)
 
template SimpleTensor< float > dft_1d (const SimpleTensor< float > &src, FFTDirection direction)
 
template SimpleTensor< float > rdft_2d (const SimpleTensor< float > &src)
 
template SimpleTensor< float > ridft_2d (const SimpleTensor< float > &src, bool is_odd)
 
template SimpleTensor< float > dft_2d (const SimpleTensor< float > &src, FFTDirection direction)
 
template SimpleTensor< float > conv2d_dft (const SimpleTensor< float > &src, const SimpleTensor< float > &w, const PadStrideInfo &conv_info)
 
template<typename T >
SimpleTensor< T > dilate (const SimpleTensor< T > &src, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > dilate (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value)
 
template SimpleTensor< int32_t > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< int32_t > &src1, const SimpleTensor< int32_t > &src2, SimpleTensor< int32_t > &dst, ConvertPolicy convert_policy)
 
template SimpleTensor< int32_t > arithmetic_operation (ArithmeticOperation op, const SimpleTensor< int32_t > &src1, const SimpleTensor< int32_t > &src2, DataType dst_data_type, ConvertPolicy convert_policy)
 
template<typename T >
SimpleTensor< T > elementwise_unary (const SimpleTensor< T > &src, ElementWiseUnary op)
 
template SimpleTensor< float > elementwise_unary (const SimpleTensor< float > &src, ElementWiseUnary op)
 
template SimpleTensor< halfelementwise_unary (const SimpleTensor< half > &src, ElementWiseUnary op)
 
template SimpleTensor< int32_t > elementwise_unary (const SimpleTensor< int32_t > &src, ElementWiseUnary op)
 
template<typename T >
SimpleTensor< T > equalize_histogram (const SimpleTensor< T > &src)
 
template SimpleTensor< uint8_t > equalize_histogram (const SimpleTensor< uint8_t > &src)
 
template<typename T >
SimpleTensor< T > erode (const SimpleTensor< T > &src, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > erode (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
std::vector< KeyPointfast_corners (const SimpleTensor< T > &src, float input_thresh, bool suppress_nonmax, BorderMode border_mode, T constant_border_value)
 
template std::vector< KeyPointfast_corners (const SimpleTensor< uint8_t > &src, float threshold, bool suppress_nonmax, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< T > flatten_layer (const SimpleTensor< T > &src, const TensorShape &shape_flatten)
 
template SimpleTensor< float > flatten_layer (const SimpleTensor< float > &src, const TensorShape &shape_flatten)
 
template SimpleTensor< halfflatten_layer (const SimpleTensor< half > &src, const TensorShape &shape_flatten)
 
template<typename T >
SimpleTensor< T > floor_layer (const SimpleTensor< T > &src)
 
template SimpleTensor< halffloor_layer (const SimpleTensor< half > &src)
 
template SimpleTensor< float > floor_layer (const SimpleTensor< float > &src)
 
template<typename T , typename TB >
SimpleTensor< T > fully_connected_layer (const SimpleTensor< T > &src, const SimpleTensor< T > &weights, const SimpleTensor< TB > &bias, const TensorShape &dst_shape, QuantizationInfo out_quant_info)
 
template SimpleTensor< float > fully_connected_layer (const SimpleTensor< float > &src, const SimpleTensor< float > &weights, const SimpleTensor< float > &bias, const TensorShape &dst_shape, QuantizationInfo out_quant_info)
 
template SimpleTensor< halffully_connected_layer (const SimpleTensor< half > &src, const SimpleTensor< half > &weights, const SimpleTensor< half > &bias, const TensorShape &dst_shape, QuantizationInfo out_quant_info)
 
template SimpleTensor< uint8_t > fully_connected_layer (const SimpleTensor< uint8_t > &src, const SimpleTensor< uint8_t > &weights, const SimpleTensor< int32_t > &bias, const TensorShape &dst_shape, QuantizationInfo out_quant_info)
 
template<typename T >
void fuse_batch_normalization_dwc_layer (const SimpleTensor< T > &w, const SimpleTensor< T > &mean, const SimpleTensor< T > &var, SimpleTensor< T > &w_fused, SimpleTensor< T > &b_fused, const SimpleTensor< T > &b, const SimpleTensor< T > &beta, const SimpleTensor< T > &gamma, float epsilon)
 
template<typename T >
void fuse_batch_normalization_conv_layer (const SimpleTensor< T > &w, const SimpleTensor< T > &mean, const SimpleTensor< T > &var, SimpleTensor< T > &w_fused, SimpleTensor< T > &b_fused, const SimpleTensor< T > &b, const SimpleTensor< T > &beta, const SimpleTensor< T > &gamma, float epsilon)
 
template void fuse_batch_normalization_dwc_layer (const SimpleTensor< float > &w, const SimpleTensor< float > &mean, const SimpleTensor< float > &var, SimpleTensor< float > &w_fused, SimpleTensor< float > &b_fused, const SimpleTensor< float > &b, const SimpleTensor< float > &beta, const SimpleTensor< float > &gamma, float epsilon)
 
template void fuse_batch_normalization_dwc_layer (const SimpleTensor< half > &w, const SimpleTensor< half > &mean, const SimpleTensor< half > &var, SimpleTensor< half > &w_fused, SimpleTensor< half > &b_fused, const SimpleTensor< half > &b, const SimpleTensor< half > &beta, const SimpleTensor< half > &gamma, float epsilon)
 
template void fuse_batch_normalization_conv_layer (const SimpleTensor< float > &w, const SimpleTensor< float > &mean, const SimpleTensor< float > &var, SimpleTensor< float > &w_fused, SimpleTensor< float > &b_fused, const SimpleTensor< float > &b, const SimpleTensor< float > &beta, const SimpleTensor< float > &gamma, float epsilon)
 
template void fuse_batch_normalization_conv_layer (const SimpleTensor< half > &w, const SimpleTensor< half > &mean, const SimpleTensor< half > &var, SimpleTensor< half > &w_fused, SimpleTensor< half > &b_fused, const SimpleTensor< half > &b, const SimpleTensor< half > &beta, const SimpleTensor< half > &gamma, float epsilon)
 
template<typename T >
SimpleTensor< T > gather (const SimpleTensor< T > &src, const SimpleTensor< uint32_t > &indices, uint32_t actual_axis)
 
template SimpleTensor< float > gather (const SimpleTensor< float > &src, const SimpleTensor< uint32_t > &indices, uint32_t actual_axis)
 
template SimpleTensor< halfgather (const SimpleTensor< half > &src, const SimpleTensor< uint32_t > &indices, uint32_t actual_axis)
 
template SimpleTensor< uint16_t > gather (const SimpleTensor< uint16_t > &src, const SimpleTensor< uint32_t > &indices, uint32_t actual_axis)
 
template SimpleTensor< uint8_t > gather (const SimpleTensor< uint8_t > &src, const SimpleTensor< uint32_t > &indices, uint32_t actual_axis)
 
template<typename T >
SimpleTensor< T > gaussian3x3 (const SimpleTensor< T > &src, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > gaussian3x3 (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< T > gaussian5x5 (const SimpleTensor< T > &src, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > gaussian5x5 (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
std::vector< SimpleTensor< T > > gaussian_pyramid_half (const SimpleTensor< T > &src, BorderMode border_mode, uint8_t constant_border_value, size_t num_levels)
 
template std::vector< SimpleTensor< uint8_t > > gaussian_pyramid_half (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value, size_t num_levels)
 
template<typename T , typename std::enable_if< is_floating_point< T >::value, int >::type >
SimpleTensor< T > gemm (const SimpleTensor< T > &a, const SimpleTensor< T > &b, const SimpleTensor< T > &c, float alpha, float beta)
 
template SimpleTensor< float > gemm (const SimpleTensor< float > &a, const SimpleTensor< float > &b, const SimpleTensor< float > &c, float alpha, float beta)
 
template SimpleTensor< halfgemm (const SimpleTensor< half > &a, const SimpleTensor< half > &b, const SimpleTensor< half > &c, float alpha, float beta)
 
template<typename T >
SimpleTensor< T > gemm_interleave_4x4 (const SimpleTensor< T > &in, SimpleTensor< T > &out)
 
template<typename T >
safe_read (const SimpleTensor< T > &t, int y, int x)
 
template<typename T >
SimpleTensor< T > gemm_interleave_blocked (const SimpleTensor< T > &in, SimpleTensor< T > &out, int int_by, int block, bool transposed)
 
template SimpleTensor< uint8_t > gemm_interleave_blocked (const SimpleTensor< uint8_t > &in, SimpleTensor< uint8_t > &out, int int_by, int block, bool transposed)
 
template<typename T_out , typename T_in >
SimpleTensor< T_out > gemmlowp_matrix_multiply_core (const SimpleTensor< T_in > &a, const SimpleTensor< T_in > &b, TensorShape shape_c, int32_t a_offset, int32_t b_offset)
 
template<typename T1 , typename T2 >
SimpleTensor< T1 > gemmlowp (const SimpleTensor< T2 > &a, const SimpleTensor< T2 > &b, TensorShape shape_c)
 
template<typename T >
SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale (const SimpleTensor< T > &in, int32_t result_offset, int32_t result_mult_int, int32_t result_shift, int32_t min, int32_t max)
 
template<typename T >
SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale (const SimpleTensor< T > &in, const SimpleTensor< T > &bias, int32_t result_offset, int32_t result_mult_int, int32_t result_shift, int32_t min, int32_t max)
 
template<typename T >
SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale_by_fixedpoint (const SimpleTensor< T > &in, int32_t result_fixedpoint_multiplier, int32_t result_shift, int32_t result_offset_after_shift, int32_t min, int32_t max)
 
template<typename T >
SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale_by_fixedpoint (const SimpleTensor< T > &in, const SimpleTensor< T > &bias, int32_t result_fixedpoint_multiplier, int32_t result_shift, int32_t result_offset_after_shift, int32_t min, int32_t max)
 
template<typename T >
SimpleTensor< int16_t > gemmlowp_quantize_down_int32_to_int16_scale_by_fixedpoint (const SimpleTensor< T > &in, int32_t result_fixedpoint_multiplier, int32_t result_shift, int32_t min, int32_t max)
 
template<typename T >
SimpleTensor< int16_t > gemmlowp_quantize_down_int32_to_int16_scale_by_fixedpoint (const SimpleTensor< T > &in, const SimpleTensor< T > &bias, int32_t result_fixedpoint_multiplier, int32_t result_shift, int32_t min, int32_t max)
 
template SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale_by_fixedpoint (const SimpleTensor< int32_t > &a, int32_t result_fixedpoint_multiplier, int32_t result_shift, int32_t result_offset_after_shift, int32_t min, int32_t max)
 
template SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale_by_fixedpoint (const SimpleTensor< int32_t > &a, const SimpleTensor< int32_t > &b, int32_t result_fixedpoint_multiplier, int32_t result_shift, int32_t result_offset_after_shift, int32_t min, int32_t max)
 
template SimpleTensor< int16_t > gemmlowp_quantize_down_int32_to_int16_scale_by_fixedpoint (const SimpleTensor< int32_t > &a, int32_t result_fixedpoint_multiplier, int32_t result_shift, int32_t min, int32_t max)
 
template SimpleTensor< int16_t > gemmlowp_quantize_down_int32_to_int16_scale_by_fixedpoint (const SimpleTensor< int32_t > &a, const SimpleTensor< int32_t > &b, int32_t result_fixedpoint_multiplier, int32_t result_shift, int32_t min, int32_t max)
 
template SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale (const SimpleTensor< int32_t > &a, int32_t result_offset, int32_t result_mult_int, int32_t result_shift, int32_t min, int32_t max)
 
template SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale (const SimpleTensor< int32_t > &a, const SimpleTensor< int32_t > &b, int32_t result_offset, int32_t result_mult_int, int32_t result_shift, int32_t min, int32_t max)
 
template SimpleTensor< int32_t > gemmlowp_matrix_multiply_core (const SimpleTensor< int8_t > &a, const SimpleTensor< int8_t > &b, TensorShape shape_c, int32_t a_offset, int32_t b_offset)
 
template SimpleTensor< int32_t > gemmlowp_matrix_multiply_core (const SimpleTensor< uint8_t > &a, const SimpleTensor< uint8_t > &b, TensorShape shape_c, int32_t a_offset, int32_t b_offset)
 
template SimpleTensor< int32_t > gemmlowp (const SimpleTensor< int8_t > &a, const SimpleTensor< int8_t > &b, TensorShape shape_c)
 
template SimpleTensor< int32_t > gemmlowp (const SimpleTensor< uint8_t > &a, const SimpleTensor< uint8_t > &b, TensorShape shape_c)
 
template<typename T1 , typename T2 >
SimpleTensor< T1 > gemmlowp_matrix_multiply_core (const SimpleTensor< T2 > &a, const SimpleTensor< T2 > &b, TensorShape shape_c, int32_t a_offset, int32_t b_offset)
 
template<typename T >
SimpleTensor< uint8_t > gemmlowp_quantize_down_int32_to_uint8_scale (const SimpleTensor< T > &in, int32_t result_offset, int32_t result_mult_int, int32_t result_shift)
 
template<typename T >
SimpleTensor< T > gemm_reshape_lhs_matrix (const SimpleTensor< T > &in, const TensorShape &output_shape, const GEMMLHSMatrixInfo &lhs_info)
 
template SimpleTensor< int > gemm_reshape_lhs_matrix (const SimpleTensor< int > &in, const TensorShape &output_shape, const GEMMLHSMatrixInfo &lhs_info)
 
template SimpleTensor< short > gemm_reshape_lhs_matrix (const SimpleTensor< short > &in, const TensorShape &output_shape, const GEMMLHSMatrixInfo &lhs_info)
 
template SimpleTensor< char > gemm_reshape_lhs_matrix (const SimpleTensor< char > &in, const TensorShape &output_shape, const GEMMLHSMatrixInfo &lhs_info)
 
template<typename T >
SimpleTensor< T > gemm_reshape_rhs_matrix (const SimpleTensor< T > &in, const TensorShape &output_shape, const GEMMRHSMatrixInfo &rhs_info)
 
template SimpleTensor< int > gemm_reshape_rhs_matrix (const SimpleTensor< int > &in, const TensorShape &output_shape, const GEMMRHSMatrixInfo &rhs_info)
 
template SimpleTensor< short > gemm_reshape_rhs_matrix (const SimpleTensor< short > &in, const TensorShape &output_shape, const GEMMRHSMatrixInfo &rhs_info)
 
template SimpleTensor< char > gemm_reshape_rhs_matrix (const SimpleTensor< char > &in, const TensorShape &output_shape, const GEMMRHSMatrixInfo &rhs_info)
 
template<typename T >
SimpleTensor< T > gemm_transpose_1xW (const SimpleTensor< T > &in)
 
template<typename T >
std::vector< KeyPointharris_corner_detector (const SimpleTensor< T > &src, float threshold, float min_dist, float sensitivity, int gradient_size, int block_size, BorderMode border_mode, T constant_border_value)
 
template std::vector< KeyPointharris_corner_detector (const SimpleTensor< uint8_t > &src, float threshold, float min_dist, float sensitivity, int gradient_size, int block_size, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< uint32_t > histogram (const SimpleTensor< T > &src, size_t num_bins, int32_t offset, uint32_t range)
 
template SimpleTensor< uint32_t > histogram (const SimpleTensor< uint8_t > &src, size_t num_bins, int32_t offset, uint32_t range)
 
template<typename T , typename U , typename V >
void hog_orientation_binning (const SimpleTensor< T > &mag, const SimpleTensor< U > &phase, SimpleTensor< V > &hog_space, const HOGInfo &hog_info)
 
template<typename T >
void hog_block_normalization (SimpleTensor< T > &desc, const SimpleTensor< T > &hog_space, const HOGInfo &hog_info)
 
template<typename T , typename U >
SimpleTensor< T > hog_descriptor (const SimpleTensor< U > &src, BorderMode border_mode, U constant_border_value, const HOGInfo &hog_info)
 
template void hog_orientation_binning (const SimpleTensor< int16_t > &mag, const SimpleTensor< uint8_t > &phase, SimpleTensor< float > &hog_space, const HOGInfo &hog_info)
 
template void hog_block_normalization (SimpleTensor< float > &desc, const SimpleTensor< float > &hog_space, const HOGInfo &hog_info)
 
template SimpleTensor< float > hog_descriptor (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value, const HOGInfo &hog_info)
 
template<typename T >
std::vector< DetectionWindowhog_detector (const SimpleTensor< T > &src, const std::vector< T > &descriptor, unsigned int max_num_detection_windows, const HOGInfo &hog_info, const Size2D &detection_window_stride, float threshold, uint16_t idx_class)
 
template std::vector< DetectionWindowhog_detector (const SimpleTensor< float > &src, const std::vector< float > &descriptor, unsigned int max_num_detection_windows, const HOGInfo &hog_info, const Size2D &detection_window_stride, float threshold, uint16_t idx_class)
 
void detection_windows_non_maxima_suppression (std::vector< DetectionWindow > &multi_windows, float min_distance)
 
template<typename T >
std::vector< DetectionWindowhog_multi_detection (const SimpleTensor< T > &src, BorderMode border_mode, T constant_border_value, const std::vector< HOGInfo > &models, std::vector< std::vector< float >> descriptors, unsigned int max_num_detection_windows, float threshold, bool non_maxima_suppression, float min_distance)
 
template std::vector< DetectionWindowhog_multi_detection (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value, const std::vector< HOGInfo > &models, std::vector< std::vector< float >> descriptors, unsigned int max_num_detection_windows, float threshold, bool non_maxima_suppression, float min_distance)
 
template<typename T >
void im2col_nchw (const SimpleTensor< T > &src, SimpleTensor< T > &dst, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, unsigned int num_groups)
 
template<typename T >
void im2col_nhwc (const SimpleTensor< T > &src, SimpleTensor< T > &dst, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias)
 
template<typename T >
void im2col (const SimpleTensor< T > &src, SimpleTensor< T > &dst, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, unsigned int num_groups)
 
template void im2col (const SimpleTensor< uint8_t > &src, SimpleTensor< uint8_t > &dst, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, unsigned int num_groups)
 
template void im2col (const SimpleTensor< half > &src, SimpleTensor< half > &dst, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, unsigned int num_groups)
 
template void im2col (const SimpleTensor< float > &src, SimpleTensor< float > &dst, const Size2D &kernel_dims, const PadStrideInfo &conv_info, bool has_bias, unsigned int num_groups)
 
template<typename T >
SimpleTensor< uint32_t > integral_image (const SimpleTensor< T > &src)
 
template SimpleTensor< uint32_t > integral_image (const SimpleTensor< uint8_t > &src)
 
template<typename T >
SimpleTensor< T > l2_normalize (const SimpleTensor< T > &src, unsigned int axis, float epsilon)
 
template SimpleTensor< float > l2_normalize (const SimpleTensor< float > &src, unsigned int axis, float epsilon)
 
template SimpleTensor< halfl2_normalize (const SimpleTensor< half > &src, unsigned int axis, float epsilon)
 
template<typename T , typename U >
std::vector< SimpleTensor< U > > laplacian_pyramid (const SimpleTensor< T > &src, SimpleTensor< U > &dst, size_t num_levels, BorderMode border_mode, uint8_t constant_border_value)
 
template std::vector< SimpleTensor< int16_t > > laplacian_pyramid (const SimpleTensor< uint8_t > &src, SimpleTensor< int16_t > &dst, size_t num_levels, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T , typename U >
SimpleTensor< U > laplacian_reconstruct (const std::vector< SimpleTensor< T >> &pyramid, const SimpleTensor< T > &low_res, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > laplacian_reconstruct (const std::vector< SimpleTensor< int16_t >> &pyramid, const SimpleTensor< int16_t > &low_res, BorderMode border_mode, int16_t constant_border_value)
 
template<typename T , typename TB >
SimpleTensor< T > locally_connected (const SimpleTensor< T > &src, const SimpleTensor< T > &weights, const SimpleTensor< TB > &bias, const TensorShape &output_shape, const PadStrideInfo &info)
 
template SimpleTensor< float > locally_connected (const SimpleTensor< float > &src, const SimpleTensor< float > &weights, const SimpleTensor< float > &bias, const TensorShape &output_shape, const PadStrideInfo &info)
 
template<typename T >
SimpleTensor< T > magnitude (const SimpleTensor< T > &gx, const SimpleTensor< T > &gy, MagnitudeType magnitude_type)
 
template SimpleTensor< int16_t > magnitude (const SimpleTensor< int16_t > &gx, const SimpleTensor< int16_t > &gy, MagnitudeType magnitude_type)
 
template SimpleTensor< int32_t > magnitude (const SimpleTensor< int32_t > &gx, const SimpleTensor< int32_t > &gy, MagnitudeType magnitude_type)
 
template SimpleTensor< half_float::half > magnitude (const SimpleTensor< half_float::half > &gx, const SimpleTensor< half_float::half > &gy, MagnitudeType magnitude_type)
 
template<typename T >
std::pair< float, float > mean_and_standard_deviation (const SimpleTensor< T > &in)
 
template std::pair< float, float > mean_and_standard_deviation (const SimpleTensor< uint8_t > &in)
 
template std::pair< float, float > mean_and_standard_deviation (const SimpleTensor< half > &in)
 
template std::pair< float, float > mean_and_standard_deviation (const SimpleTensor< float > &in)
 
template<typename T >
SimpleTensor< T > mean_std_normalization_layer (const SimpleTensor< T > &src, float epsilon)
 
template SimpleTensor< float > mean_std_normalization_layer (const SimpleTensor< float > &src, float epsilon)
 
template SimpleTensor< halfmean_std_normalization_layer (const SimpleTensor< half > &src, float epsilon)
 
template<typename T >
SimpleTensor< T > median3x3 (const SimpleTensor< T > &src, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > median3x3 (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
void compute_min_max (const SimpleTensor< T > &src, T &min, T &max)
 
template<typename T >
MinMaxLocationValues< T > min_max_location (const SimpleTensor< T > &src)
 
template MinMaxLocationValues< uint8_t > min_max_location (const SimpleTensor< uint8_t > &src)
 
template MinMaxLocationValues< int16_t > min_max_location (const SimpleTensor< int16_t > &src)
 
template MinMaxLocationValues< float > min_max_location (const SimpleTensor< float > &src)
 
template<typename T >
SimpleTensor< T > non_linear_filter (const SimpleTensor< T > &src, NonLinearFilterFunction function, unsigned int mask_size, MatrixPattern pattern, const uint8_t *mask, BorderMode border_mode, uint8_t constant_border_value)
 
template SimpleTensor< uint8_t > non_linear_filter (const SimpleTensor< uint8_t > &src, NonLinearFilterFunction function, unsigned int mask_size, MatrixPattern pattern, const uint8_t *mask, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< T > non_maxima_suppression (const SimpleTensor< T > &src, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< float > non_maxima_suppression (const SimpleTensor< float > &src, BorderMode border_mode, float constant_border_value)
 
template SimpleTensor< uint8_t > non_maxima_suppression (const SimpleTensor< uint8_t > &src, BorderMode border_mode, uint8_t constant_border_value)
 
SimpleTensor< int > non_max_suppression (const SimpleTensor< float > &bboxes, const SimpleTensor< float > &scores, SimpleTensor< int > &indices, unsigned int max_output_size, float score_threshold, float nms_threshold)
 
template<typename T >
SimpleTensor< T > normalization_layer (const SimpleTensor< T > &src, NormalizationLayerInfo info)
 
template SimpleTensor< float > normalization_layer (const SimpleTensor< float > &src, NormalizationLayerInfo info)
 
template SimpleTensor< halfnormalization_layer (const SimpleTensor< half > &src, NormalizationLayerInfo info)
 
template<typename T >
SimpleTensor< T > normalize_planar_yuv_layer (const SimpleTensor< T > &src, const SimpleTensor< T > &mean, const SimpleTensor< T > &std)
 
template<>
SimpleTensor< uint8_t > normalize_planar_yuv_layer< uint8_t > (const SimpleTensor< uint8_t > &src, const SimpleTensor< uint8_t > &mean, const SimpleTensor< uint8_t > &std)
 
template SimpleTensor< halfnormalize_planar_yuv_layer (const SimpleTensor< half > &src, const SimpleTensor< half > &mean, const SimpleTensor< half > &std)
 
template SimpleTensor< float > normalize_planar_yuv_layer (const SimpleTensor< float > &src, const SimpleTensor< float > &mean, const SimpleTensor< float > &std)
 
template<typename T >
std::vector< KeyPointoptical_flow (const SimpleTensor< T > &old_input, const SimpleTensor< T > &new_input, const OpticalFlowParameters &params, size_t num_levels, const std::vector< KeyPoint > &old_points, const std::vector< KeyPoint > &new_points_estimates, BorderMode border_mode, uint8_t constant_border_value)
 
template std::vector< KeyPointoptical_flow (const SimpleTensor< uint8_t > &old_input, const SimpleTensor< uint8_t > &new_input, const OpticalFlowParameters &params, size_t num_levels, const std::vector< KeyPoint > &old_points, const std::vector< KeyPoint > &new_points_estimates, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< T > pad_layer (const SimpleTensor< T > &src, const PaddingList &paddings, const PixelValue const_value=PixelValue(), const PaddingMode mode=PaddingMode::CONSTANT)
 Reference function to pad an ND tensor. More...
 
template SimpleTensor< float > pad_layer (const SimpleTensor< float > &src, const PaddingList &paddings, const PixelValue const_value=PixelValue(), const PaddingMode mode)
 
template SimpleTensor< halfpad_layer (const SimpleTensor< half > &src, const PaddingList &paddings, const PixelValue const_value=PixelValue(), const PaddingMode mode)
 
template SimpleTensor< uint32_t > pad_layer (const SimpleTensor< uint32_t > &src, const PaddingList &paddings, const PixelValue const_value=PixelValue(), const PaddingMode mode)
 
template SimpleTensor< uint8_t > pad_layer (const SimpleTensor< uint8_t > &src, const PaddingList &paddings, const PixelValue const_value=PixelValue(), const PaddingMode mode)
 
template SimpleTensor< int8_t > pad_layer (const SimpleTensor< int8_t > &src, const PaddingList &paddings, const PixelValue const_value=PixelValue(), const PaddingMode mode)
 
template SimpleTensor< uint16_t > pad_layer (const SimpleTensor< uint16_t > &src, const PaddingList &paddings, const PixelValue const_value=PixelValue(), const PaddingMode mode)
 
template SimpleTensor< int16_t > pad_layer (const SimpleTensor< int16_t > &src, const PaddingList &paddings, const PixelValue const_value=PixelValue(), const PaddingMode mode)
 
template<typename T >
SimpleTensor< T > permute (const SimpleTensor< T > &src, PermutationVector perm)
 
template SimpleTensor< int8_t > permute (const SimpleTensor< int8_t > &src, PermutationVector perm)
 
template SimpleTensor< uint8_t > permute (const SimpleTensor< uint8_t > &src, PermutationVector perm)
 
template SimpleTensor< int16_t > permute (const SimpleTensor< int16_t > &src, PermutationVector perm)
 
template SimpleTensor< uint16_t > permute (const SimpleTensor< uint16_t > &src, PermutationVector perm)
 
template SimpleTensor< uint32_t > permute (const SimpleTensor< uint32_t > &src, PermutationVector perm)
 
template SimpleTensor< float > permute (const SimpleTensor< float > &src, PermutationVector perm)
 
template SimpleTensor< halfpermute (const SimpleTensor< half > &src, PermutationVector perm)
 
template<typename T >
SimpleTensor< uint8_t > phase (const SimpleTensor< T > &gx, const SimpleTensor< T > &gy, PhaseType phase_type)
 
template SimpleTensor< uint8_t > phase (const SimpleTensor< int16_t > &gx, const SimpleTensor< int16_t > &gy, PhaseType phase_type)
 
template SimpleTensor< uint8_t > phase (const SimpleTensor< int32_t > &gx, const SimpleTensor< int32_t > &gy, PhaseType phase_type)
 
template<typename T1 , typename T2 >
SimpleTensor< T2 > pixel_wise_multiplication (const SimpleTensor< T1 > &src1, const SimpleTensor< T2 > &src2, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy, const QuantizationInfo &qout)
 
template<>
SimpleTensor< uint8_t > pixel_wise_multiplication (const SimpleTensor< uint8_t > &src1, const SimpleTensor< uint8_t > &src2, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy, const QuantizationInfo &qout)
 
template<>
SimpleTensor< int16_t > pixel_wise_multiplication (const SimpleTensor< int16_t > &src1, const SimpleTensor< int16_t > &src2, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy, const QuantizationInfo &qout)
 
template SimpleTensor< int16_t > pixel_wise_multiplication (const SimpleTensor< uint8_t > &src1, const SimpleTensor< int16_t > &src2, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy, const QuantizationInfo &qout)
 
template SimpleTensor< float > pixel_wise_multiplication (const SimpleTensor< float > &src1, const SimpleTensor< float > &src2, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy, const QuantizationInfo &qout)
 
template SimpleTensor< half_float::half > pixel_wise_multiplication (const SimpleTensor< half_float::half > &src1, const SimpleTensor< half_float::half > &src2, float scale, ConvertPolicy convert_policy, RoundingPolicy rounding_policy, const QuantizationInfo &qout)
 
template<typename T >
SimpleTensor< T > pooling_layer (const SimpleTensor< T > &src, const PoolingLayerInfo &info, const QuantizationInfo &output_qinfo)
 
template<>
SimpleTensor< uint8_t > pooling_layer< uint8_t > (const SimpleTensor< uint8_t > &src, const PoolingLayerInfo &info, const QuantizationInfo &output_qinfo)
 
template SimpleTensor< float > pooling_layer (const SimpleTensor< float > &src, const PoolingLayerInfo &info, const QuantizationInfo &output_qinfo)
 
template SimpleTensor< halfpooling_layer (const SimpleTensor< half > &src, const PoolingLayerInfo &info, const QuantizationInfo &output_qinfo)
 
template<typename T >
SimpleTensor< T > prior_box_layer (const SimpleTensor< T > &src1, const SimpleTensor< T > &src2, const PriorBoxLayerInfo &info, const TensorShape &output_shape)
 
template SimpleTensor< float > prior_box_layer (const SimpleTensor< float > &src1, const SimpleTensor< float > &src2, const PriorBoxLayerInfo &info, const TensorShape &output_shape)
 
template<typename T >
SimpleTensor< uint8_t > quantization_layer (const SimpleTensor< T > &src, const QuantizationInfo &quantization_info)
 
template SimpleTensor< uint8_t > quantization_layer (const SimpleTensor< half > &src, const QuantizationInfo &quantization_info)
 
template SimpleTensor< uint8_t > quantization_layer (const SimpleTensor< float > &src, const QuantizationInfo &quantization_info)
 
template<typename T >
SimpleTensor< T > range (SimpleTensor< T > &dst, float start, const size_t num_of_elements, float step)
 
template<>
SimpleTensor< uint8_t > range (SimpleTensor< uint8_t > &dst, float start, const size_t num_of_elements, float step)
 
template SimpleTensor< float > range (SimpleTensor< float > &dst, float start, const size_t num_of_elements, float step)
 
template SimpleTensor< halfrange (SimpleTensor< half > &dst, float start, const size_t num_of_elements, float step)
 
template SimpleTensor< int8_t > range (SimpleTensor< int8_t > &dst, float start, const size_t num_of_elements, float step)
 
template SimpleTensor< uint16_t > range (SimpleTensor< uint16_t > &dst, float start, const size_t num_of_elements, float step)
 
template SimpleTensor< int16_t > range (SimpleTensor< int16_t > &dst, float start, const size_t num_of_elements, float step)
 
template<typename T , typename OT >
SimpleTensor< OT > compute_reduction_operation (const SimpleTensor< T > &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op)
 
template<typename T , typename OT >
SimpleTensor< OT > reduction_operation (const SimpleTensor< T > &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op)
 
template<>
SimpleTensor< uint8_t > reduction_operation (const SimpleTensor< uint8_t > &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op)
 
template SimpleTensor< float > reduction_operation (const SimpleTensor< float > &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op)
 
template SimpleTensor< halfreduction_operation (const SimpleTensor< half > &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op)
 
template SimpleTensor< uint32_t > reduction_operation (const SimpleTensor< int32_t > &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op)
 
template<typename T >
SimpleTensor< T > remap (const SimpleTensor< T > &in, SimpleTensor< float > &map_x, SimpleTensor< float > &map_y, SimpleTensor< T > &valid_mask, InterpolationPolicy policy, BorderMode border_mode, T constant_border_value)
 
template SimpleTensor< uint8_t > remap (const SimpleTensor< uint8_t > &src, SimpleTensor< float > &map_x, SimpleTensor< float > &map_y, SimpleTensor< uint8_t > &valid_mask, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< T > reorg_layer (const SimpleTensor< T > &src, int32_t stride)
 
template SimpleTensor< int32_t > reorg_layer (const SimpleTensor< int32_t > &src, int32_t stride)
 
template SimpleTensor< int16_t > reorg_layer (const SimpleTensor< int16_t > &src, int32_t stride)
 
template SimpleTensor< int8_t > reorg_layer (const SimpleTensor< int8_t > &src, int32_t stride)
 
template<typename T >
SimpleTensor< T > reshape_layer (const SimpleTensor< T > &src, const TensorShape &output_shape)
 [ReshapeLayer] More...
 
template SimpleTensor< uint8_t > reshape_layer (const SimpleTensor< uint8_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< int8_t > reshape_layer (const SimpleTensor< int8_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< uint16_t > reshape_layer (const SimpleTensor< uint16_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< int16_t > reshape_layer (const SimpleTensor< int16_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< uint32_t > reshape_layer (const SimpleTensor< uint32_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< int32_t > reshape_layer (const SimpleTensor< int32_t > &src, const TensorShape &output_shape)
 
template SimpleTensor< halfreshape_layer (const SimpleTensor< half > &src, const TensorShape &output_shape)
 
template SimpleTensor< float > reshape_layer (const SimpleTensor< float > &src, const TensorShape &output_shape)
 
template<typename T >
SimpleTensor< T > reverse (const SimpleTensor< T > &src, const SimpleTensor< uint32_t > &axis)
 
template SimpleTensor< uint8_t > reverse (const SimpleTensor< uint8_t > &src, const SimpleTensor< uint32_t > &axis)
 
template SimpleTensor< halfreverse (const SimpleTensor< half > &src, const SimpleTensor< uint32_t > &axis)
 
template SimpleTensor< float > reverse (const SimpleTensor< float > &src, const SimpleTensor< uint32_t > &axis)
 
template<typename T >
SimpleTensor< T > roi_align_layer (const SimpleTensor< T > &src, const SimpleTensor< T > &rois, const ROIPoolingLayerInfo &pool_info)
 
template SimpleTensor< float > roi_align_layer (const SimpleTensor< float > &src, const SimpleTensor< float > &rois, const ROIPoolingLayerInfo &pool_info)
 
template SimpleTensor< halfroi_align_layer (const SimpleTensor< half > &src, const SimpleTensor< half > &rois, const ROIPoolingLayerInfo &pool_info)
 
template<typename T >
SimpleTensor< T > scale_core (const SimpleTensor< T > &in, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, T constant_border_value, SamplingPolicy sampling_policy, bool ceil_policy_scale)
 
template<typename T >
SimpleTensor< T > scale (const SimpleTensor< T > &src, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, T constant_border_value, SamplingPolicy sampling_policy, bool ceil_policy_scale)
 
template<>
SimpleTensor< uint8_t > scale (const SimpleTensor< uint8_t > &src, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value, SamplingPolicy sampling_policy, bool ceil_policy_scale)
 
template SimpleTensor< int16_t > scale (const SimpleTensor< int16_t > &src, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, int16_t constant_border_value, SamplingPolicy sampling_policy, bool ceil_policy_scale)
 
template SimpleTensor< halfscale (const SimpleTensor< half > &src, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, half constant_border_value, SamplingPolicy sampling_policy, bool ceil_policy_scale)
 
template SimpleTensor< float > scale (const SimpleTensor< float > &src, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, float constant_border_value, SamplingPolicy sampling_policy, bool ceil_policy_scale)
 
template<typename T , typename U >
std::pair< SimpleTensor< T >, SimpleTensor< T > > scharr (const SimpleTensor< U > &src, int filter_size, BorderMode border_mode, uint8_t constant_border_value, GradientDimension gradient_dimension)
 
template std::pair< SimpleTensor< int16_t >, SimpleTensor< int16_t > > scharr (const SimpleTensor< uint8_t > &src, int filter_size, BorderMode border_mode, uint8_t constant_border_value, GradientDimension gradient_dimension)
 
template<typename T >
SimpleTensor< T > select (const SimpleTensor< uint8_t > &c, const SimpleTensor< T > &x, const SimpleTensor< T > &y)
 
template SimpleTensor< uint8_t > select (const SimpleTensor< uint8_t > &c, const SimpleTensor< uint8_t > &x, const SimpleTensor< uint8_t > &y)
 
template SimpleTensor< halfselect (const SimpleTensor< uint8_t > &c, const SimpleTensor< half > &x, const SimpleTensor< half > &y)
 
template SimpleTensor< float > select (const SimpleTensor< uint8_t > &c, const SimpleTensor< float > &x, const SimpleTensor< float > &y)
 
template<typename T >
SimpleTensor< T > slice (const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)
 
template SimpleTensor< float > slice (const SimpleTensor< float > &src, Coordinates starts, Coordinates ends)
 
template SimpleTensor< half_float::half > slice (const SimpleTensor< half_float::half > &src, Coordinates starts, Coordinates ends)
 
template<typename T >
SimpleTensor< T > strided_slice (const SimpleTensor< T > &src, Coordinates starts, Coordinates ends, BiStrides strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
 
template SimpleTensor< float > strided_slice (const SimpleTensor< float > &src, Coordinates starts, Coordinates ends, BiStrides strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
 
template SimpleTensor< half_float::half > strided_slice (const SimpleTensor< half_float::half > &src, Coordinates starts, Coordinates ends, BiStrides strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)
 
template<typename T , typename U >
std::pair< SimpleTensor< T >, SimpleTensor< T > > sobel (const SimpleTensor< U > &src, int filter_size, BorderMode border_mode, uint8_t constant_border_value, GradientDimension gradient_dimension)
 
template std::pair< SimpleTensor< int16_t >, SimpleTensor< int16_t > > sobel (const SimpleTensor< uint8_t > &src, int filter_size, BorderMode border_mode, uint8_t constant_border_value, GradientDimension gradient_dimension)
 
template<typename T , typename std::enable_if< is_floating_point< T >::value, int >::type >
SimpleTensor< T > softmax_layer (const SimpleTensor< T > &src, float beta, size_t axis)
 
template SimpleTensor< float > softmax_layer (const SimpleTensor< float > &src, float beta, size_t axis)
 
template SimpleTensor< halfsoftmax_layer (const SimpleTensor< half > &src, float beta, size_t axis)
 
template SimpleTensor< uint8_t > softmax_layer (const SimpleTensor< uint8_t > &src, float beta, size_t axis)
 
template<typename T >
SimpleTensor< T > space_to_batch (const SimpleTensor< T > &src, const SimpleTensor< int32_t > &block_shape, const SimpleTensor< int32_t > &paddings, const TensorShape &dst_shape)
 
template SimpleTensor< float > space_to_batch (const SimpleTensor< float > &src, const SimpleTensor< int32_t > &block_shape, const SimpleTensor< int32_t > &paddings, const TensorShape &dst_shape)
 
template SimpleTensor< halfspace_to_batch (const SimpleTensor< half > &src, const SimpleTensor< int32_t > &block_shape, const SimpleTensor< int32_t > &paddings, const TensorShape &dst_shape)
 
template SimpleTensor< uint8_t > space_to_batch (const SimpleTensor< uint8_t > &src, const SimpleTensor< int32_t > &block_shape, const SimpleTensor< int32_t > &paddings, const TensorShape &dst_shape)
 
template<typename T >
SimpleTensor< T > space_to_depth (const SimpleTensor< T > &src, const TensorShape &dst_shape, const int block_shape)
 
template SimpleTensor< float > space_to_depth (const SimpleTensor< float > &src, const TensorShape &dst_shape, const int block_shape)
 
template SimpleTensor< halfspace_to_depth (const SimpleTensor< half > &src, const TensorShape &dst_shape, const int block_shape)
 
template<typename T >
SimpleTensor< T > stack_layer (const std::vector< SimpleTensor< T >> &in, const TensorShape &output_shape, DataType data_type, unsigned int axis)
 
template SimpleTensor< int > stack_layer (const std::vector< SimpleTensor< int >> &in, const TensorShape &output_shape, DataType data_type, unsigned int axis)
 
template SimpleTensor< short > stack_layer (const std::vector< SimpleTensor< short >> &in, const TensorShape &output_shape, DataType data_type, unsigned int axis)
 
template SimpleTensor< char > stack_layer (const std::vector< SimpleTensor< char >> &in, const TensorShape &output_shape, DataType data_type, unsigned int axis)
 
template<typename T >
SimpleTensor< T > table_lookup (const SimpleTensor< T > &src, const std::map< T, T > &rawlut)
 
template SimpleTensor< uint8_t > table_lookup (const SimpleTensor< uint8_t > &src, const std::map< uint8_t, uint8_t > &rawlut)
 
template SimpleTensor< int16_t > table_lookup (const SimpleTensor< int16_t > &src, const std::map< int16_t, int16_t > &rawlut)
 
template<typename T >
SimpleTensor< T > threshold (const SimpleTensor< T > &src, T threshold, T false_value, T true_value, ThresholdType type, T upper)
 
template SimpleTensor< uint8_t > threshold (const SimpleTensor< uint8_t > &src, uint8_t threshold, uint8_t false_value, uint8_t true_value, ThresholdType type, uint8_t upper)
 
template<typename T >
SimpleTensor< T > tile (const SimpleTensor< T > &src, const Multiples &multiples)
 
template SimpleTensor< uint8_t > tile (const SimpleTensor< uint8_t > &src, const Multiples &multiples)
 
template SimpleTensor< int8_t > tile (const SimpleTensor< int8_t > &src, const Multiples &multiples)
 
template SimpleTensor< uint16_t > tile (const SimpleTensor< uint16_t > &src, const Multiples &multiples)
 
template SimpleTensor< int16_t > tile (const SimpleTensor< int16_t > &src, const Multiples &multiples)
 
template SimpleTensor< uint32_t > tile (const SimpleTensor< uint32_t > &src, const Multiples &multiples)
 
template SimpleTensor< int32_t > tile (const SimpleTensor< int32_t > &src, const Multiples &multiples)
 
template SimpleTensor< halftile (const SimpleTensor< half > &src, const Multiples &multiples)
 
template SimpleTensor< float > tile (const SimpleTensor< float > &src, const Multiples &multiples)
 
template<typename T >
SimpleTensor< T > transpose (const SimpleTensor< T > &src)
 
template SimpleTensor< uint8_t > transpose (const SimpleTensor< uint8_t > &src)
 
template SimpleTensor< uint16_t > transpose (const SimpleTensor< uint16_t > &src)
 
template SimpleTensor< uint32_t > transpose (const SimpleTensor< uint32_t > &src)
 
template SimpleTensor< halftranspose (const SimpleTensor< half > &src)
 
template SimpleTensor< float > transpose (const SimpleTensor< float > &src)
 
template<typename T >
std::vector< SimpleTensor< T > > unstack (const SimpleTensor< T > &input_tensor, std::vector< SimpleTensor< T >> &output_tensors, int axis)
 
template std::vector< SimpleTensor< float > > unstack (const SimpleTensor< float > &input_tensor, std::vector< SimpleTensor< float >> &output_tensors, int axis)
 
template std::vector< SimpleTensor< half > > unstack (const SimpleTensor< half > &input_tensor, std::vector< SimpleTensor< half >> &output_tensors, int axis)
 
template std::vector< SimpleTensor< uint8_t > > unstack (const SimpleTensor< uint8_t > &input_tensor, std::vector< SimpleTensor< uint8_t >> &output_tensors, int axis)
 
template<typename T >
SimpleTensor< T > upsample_layer (const SimpleTensor< T > &src, const Size2D &info, const InterpolationPolicy policy)
 
template<>
SimpleTensor< uint8_t > upsample_layer (const SimpleTensor< uint8_t > &src, const Size2D &info, const InterpolationPolicy policy)
 
template SimpleTensor< float > upsample_layer (const SimpleTensor< float > &src, const Size2D &info, const InterpolationPolicy policy)
 
template SimpleTensor< halfupsample_layer (const SimpleTensor< half > &src, const Size2D &info, const InterpolationPolicy policy)
 
bool valid_bilinear_policy (float xn, float yn, int width, int height, BorderMode border_mode)
 
template<typename T >
SimpleTensor< T > warp_affine (const SimpleTensor< T > &src, SimpleTensor< T > &valid_mask, const float *matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value)
 
template SimpleTensor< uint8_t > warp_affine (const SimpleTensor< uint8_t > &src, SimpleTensor< uint8_t > &valid_mask, const float *matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< T > warp_perspective (const SimpleTensor< T > &src, SimpleTensor< T > &valid_mask, const float *matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value)
 
template SimpleTensor< uint8_t > warp_perspective (const SimpleTensor< uint8_t > &src, SimpleTensor< uint8_t > &valid_mask, const float *matrix, InterpolationPolicy policy, BorderMode border_mode, uint8_t constant_border_value)
 
template<typename T >
SimpleTensor< T > weights_reshape (const SimpleTensor< T > &src, const SimpleTensor< T > &biases, const TensorShape &dst_shape, const unsigned int num_groups)
 
template SimpleTensor< float > weights_reshape (const SimpleTensor< float > &src, const SimpleTensor< float > &biases, const TensorShape &dst_shape, const unsigned int num_groups)
 
template SimpleTensor< halfweights_reshape (const SimpleTensor< half > &src, const SimpleTensor< half > &biases, const TensorShape &dst_shape, const unsigned int num_groups)
 
template SimpleTensor< uint8_t > weights_reshape (const SimpleTensor< uint8_t > &src, const SimpleTensor< uint8_t > &biases, const TensorShape &dst_shape, const unsigned int num_groups)
 
template<typename T >
SimpleTensor< T > winograd_input_transform (const SimpleTensor< T > &in, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template<typename T >
SimpleTensor< T > winograd_filter_transform (const SimpleTensor< T > &in, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template<typename T >
SimpleTensor< T > winograd_output_transform (const SimpleTensor< T > &in, const SimpleTensor< T > &b, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template SimpleTensor< float > winograd_filter_transform (const SimpleTensor< float > &in, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template SimpleTensor< float > winograd_input_transform (const SimpleTensor< float > &in, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template SimpleTensor< float > winograd_output_transform (const SimpleTensor< float > &in, const SimpleTensor< float > &b, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template SimpleTensor< halfwinograd_filter_transform (const SimpleTensor< half > &in, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template SimpleTensor< halfwinograd_input_transform (const SimpleTensor< half > &in, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template SimpleTensor< halfwinograd_output_transform (const SimpleTensor< half > &in, const SimpleTensor< half > &b, const TensorShape &output_shape, const WinogradInfo &winograd_info)
 
template<typename T , typename std::enable_if< is_floating_point< T >::value, int >::type >
SimpleTensor< T > yolo_layer (const SimpleTensor< T > &src, const ActivationLayerInfo &info, int32_t num_classes)
 
template<>
SimpleTensor< uint8_t > yolo_layer< uint8_t > (const SimpleTensor< uint8_t > &src, const ActivationLayerInfo &info, int32_t num_classes)
 
template SimpleTensor< float > yolo_layer (const SimpleTensor< float > &src, const ActivationLayerInfo &info, int32_t num_classes)
 
template SimpleTensor< halfyolo_layer (const SimpleTensor< half > &src, const ActivationLayerInfo &info, int32_t num_classes)
 

Enumeration Type Documentation

◆ ArithmeticOperation

enum ArithmeticOperation
strong

Arithmetic operation types.

Enumerator
ADD 
SUB 

Definition at line 39 of file ArithmeticOperations.h.

40 {
41  ADD,
42  SUB
43 };
#define ADD(x, y)
List of all the operations supported by this kernel.
#define SUB(x, y)

◆ FFTDirection

enum FFTDirection
strong
Enumerator
Forward 
Inverse 

Definition at line 38 of file DFT.h.

◆ WinogradTransformType

enum WinogradTransformType
strong

Winograd transform type.

Enumerator
INPUT 

Winograd input transform.

FILTER 

Winograd filter transform.

OUTPUT 

Winograd output transform.

Definition at line 40 of file Winograd.h.

Function Documentation

◆ absolute_difference() [1/4]

SimpleTensor< T > absolute_difference ( const SimpleTensor< T > &  src1,
const SimpleTensor< T > &  src2,
DataType  dst_data_type 
)

Definition at line 38 of file AbsoluteDifference.cpp.

39 {
40  SimpleTensor<T> result(src1.shape(), dst_data_type);
41 
42  using intermediate_type = typename common_promoted_signed_type<T>::intermediate_type;
43 
44  for(int i = 0; i < src1.num_elements(); ++i)
45  {
46  intermediate_type val = std::abs(static_cast<intermediate_type>(src1[i]) - static_cast<intermediate_type>(src2[i]));
47  result[i] = saturate_cast<T>(val);
48  }
49 
50  return result;
51 }

References SimpleTensor< T >::num_elements(), and SimpleTensor< T >::shape().

◆ absolute_difference() [2/4]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::absolute_difference ( const SimpleTensor< uint8_t > &  src1,
const SimpleTensor< uint8_t > &  src2,
DataType  dst_data_type 
)

◆ absolute_difference() [3/4]

template SimpleTensor<int16_t> arm_compute::test::validation::reference::absolute_difference ( const SimpleTensor< int16_t > &  src1,
const SimpleTensor< int16_t > &  src2,
DataType  dst_data_type 
)

◆ absolute_difference() [4/4]

template SimpleTensor<int8_t> arm_compute::test::validation::reference::absolute_difference ( const SimpleTensor< int8_t > &  src1,
const SimpleTensor< int8_t > &  src2,
DataType  dst_data_type 
)

◆ accumulate() [1/2]

SimpleTensor< T2 > accumulate ( const SimpleTensor< T1 > &  src,
DataType  output_data_type 
)

Definition at line 38 of file Accumulate.cpp.

39 {
40  SimpleTensor<T2> dst{ src.shape(), output_data_type };
41 
42  library->fill_tensor_uniform(dst, 1, static_cast<T2>(0), static_cast<T2>(std::numeric_limits<T1>::max()));
43 
44  using intermediate_type = typename common_promoted_signed_type<T1, T2>::intermediate_type;
45 
46  for(int i = 0; i < src.num_elements(); ++i)
47  {
48  intermediate_type val = static_cast<intermediate_type>(src[i]) + static_cast<intermediate_type>(dst[i]);
49  dst[i] = saturate_cast<T2>(val);
50  }
51 
52  return dst;
53 }
std::unique_ptr< AssetsLibrary > library
Definition: main.cpp:75
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::dst, arm_compute::test::library, arm_compute::test::validation::output_data_type, and arm_compute::test::validation::src.

◆ accumulate() [2/2]

template SimpleTensor<int16_t> arm_compute::test::validation::reference::accumulate ( const SimpleTensor< uint8_t > &  src,
DataType  output_data_type 
)

◆ accumulate_squared() [1/2]

SimpleTensor< T2 > accumulate_squared ( const SimpleTensor< T1 > &  src,
uint32_t  shift,
DataType  output_data_type 
)

Definition at line 76 of file Accumulate.cpp.

77 {
78  ARM_COMPUTE_ERROR_ON_MSG(shift > 15, "Shift in accumulate_squared must be within the range [0, 15]");
79 
80  SimpleTensor<T2> dst{ src.shape(), output_data_type };
81 
82  library->fill_tensor_uniform(dst, 1, static_cast<T2>(0), static_cast<T2>(std::numeric_limits<T1>::max()));
83 
84  using intermediate_type = typename common_promoted_signed_type<T1, T2>::intermediate_type;
85  intermediate_type denom = 1 << shift;
86 
87  for(int i = 0; i < src.num_elements(); ++i)
88  {
89  intermediate_type val = static_cast<intermediate_type>(dst[i]) + (static_cast<intermediate_type>(src[i]) * static_cast<intermediate_type>(src[i]) / denom);
90  dst[i] = saturate_cast<T2>(val);
91  }
92 
93  return dst;
94 }
std::unique_ptr< AssetsLibrary > library
Definition: main.cpp:75
cast configure & src
Definition: Cast.cpp:169
#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)
Definition: Error.h:328

References ARM_COMPUTE_ERROR_ON_MSG, arm_compute::test::validation::dst, arm_compute::test::library, arm_compute::test::validation::output_data_type, arm_compute::test::validation::shift, and arm_compute::test::validation::src.

◆ accumulate_squared() [2/2]

template SimpleTensor<int16_t> arm_compute::test::validation::reference::accumulate_squared ( const SimpleTensor< uint8_t > &  src,
uint32_t  shift,
DataType  output_data_type 
)

◆ accumulate_weighted() [1/2]

SimpleTensor< T2 > accumulate_weighted ( const SimpleTensor< T1 > &  src,
float  alpha,
DataType  output_data_type 
)

Definition at line 56 of file Accumulate.cpp.

57 {
58  ARM_COMPUTE_ERROR_ON_MSG(alpha < 0.f || alpha > 1.f, "Weight (alpha) specified in accumulate_weighted must be within the range [0, 1]");
59 
60  SimpleTensor<T2> dst{ src.shape(), output_data_type };
61 
62  library->fill_tensor_uniform(dst, 1, static_cast<T2>(0), static_cast<T2>(std::numeric_limits<T1>::max()));
63 
64  using intermediate_type = typename common_promoted_signed_type<T1, T2>::intermediate_type;
65 
66  for(int i = 0; i < src.num_elements(); ++i)
67  {
68  double val = (1. - static_cast<double>(alpha)) * static_cast<intermediate_type>(dst[i]) + static_cast<double>(alpha) * static_cast<intermediate_type>(src[i]);
69  dst[i] = static_cast<T2>(val);
70  }
71 
72  return dst;
73 }
std::unique_ptr< AssetsLibrary > library
Definition: main.cpp:75
cast configure & src
Definition: Cast.cpp:169
#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)
Definition: Error.h:328

References arm_compute::test::validation::alpha, ARM_COMPUTE_ERROR_ON_MSG, arm_compute::test::validation::dst, arm_compute::test::library, arm_compute::test::validation::output_data_type, and arm_compute::test::validation::src.

◆ accumulate_weighted() [2/2]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::accumulate_weighted ( const SimpleTensor< uint8_t > &  src,
float  alpha,
DataType  output_data_type 
)

◆ activate_float()

T arm_compute::test::validation::reference::activate_float ( x,
a,
b,
ActivationLayerInfo::ActivationFunction  activation 
)
inline

Definition at line 39 of file ActivationLayer.h.

40 {
41  T ret;
42 
43  switch(activation)
44  {
45  case ActivationLayerInfo::ActivationFunction::ABS:
46  ret = std::abs(x);
47  break;
48  case ActivationLayerInfo::ActivationFunction::LINEAR:
49  ret = a * x + b;
50  break;
51  case ActivationLayerInfo::ActivationFunction::LOGISTIC:
52  ret = static_cast<T>(1) / (static_cast<T>(1) + std::exp(-x));
53  break;
54  case ActivationLayerInfo::ActivationFunction::RELU:
55  ret = std::max<T>(static_cast<T>(0), x);
56  break;
57  case ActivationLayerInfo::ActivationFunction::BOUNDED_RELU:
58  ret = std::min<T>(a, std::max(static_cast<T>(0), x));
59  break;
60  case ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU:
61  ret = std::min<T>(a, std::max<T>(b, x));
62  break;
63  case ActivationLayerInfo::ActivationFunction::LEAKY_RELU:
64  ret = (x > 0) ? x : a * x;
65  break;
66  case ActivationLayerInfo::ActivationFunction::SOFT_RELU:
67  ret = std::log(static_cast<T>(1) + std::exp(x));
68  break;
69  case ActivationLayerInfo::ActivationFunction::SQRT:
70  ret = std::sqrt(x);
71  break;
72  case ActivationLayerInfo::ActivationFunction::SQUARE:
73  ret = x * x;
74  break;
75  case ActivationLayerInfo::ActivationFunction::TANH:
76  ret = a * std::tanh(b * x);
77  break;
78  case ActivationLayerInfo::ActivationFunction::IDENTITY:
79  ret = x;
80  break;
81  default:
82  ARM_COMPUTE_ERROR("Unsupported activation function");
83  break;
84  }
85 
86  return ret;
87 }
#define ARM_COMPUTE_ERROR(...)
Print the given message then throw an std::runtime_error.
Definition: Error.h:261
SimpleTensor< float > b
Definition: DFT.cpp:157

References ActivationLayerInfo::ABS, ARM_COMPUTE_ERROR, arm_compute::test::validation::b, ActivationLayerInfo::BOUNDED_RELU, ActivationLayerInfo::IDENTITY, ActivationLayerInfo::LEAKY_RELU, ActivationLayerInfo::LINEAR, ActivationLayerInfo::LOGISTIC, ActivationLayerInfo::LU_BOUNDED_RELU, ActivationLayerInfo::RELU, ActivationLayerInfo::SOFT_RELU, ActivationLayerInfo::SQRT, ActivationLayerInfo::SQUARE, and ActivationLayerInfo::TANH.

◆ activation_layer() [1/3]

SimpleTensor< T > activation_layer ( const SimpleTensor< T > &  src,
ActivationLayerInfo  info,
const QuantizationInfo oq_info 
)

Definition at line 38 of file ActivationLayer.cpp.

39 {
40  ARM_COMPUTE_UNUSED(oq_info);
41 
42  // Create reference
43  SimpleTensor<T> dst{ src.shape(), src.data_type(), 1 };
44 
45  // Compute reference
46  const T a(info.a());
47  const T b(info.b());
48 
49  for(int i = 0; i < src.num_elements(); ++i)
50  {
51  dst[i] = activate_float<T>(src[i], a, b, info.activation());
52  }
53 
54  return dst;
55 }
SimpleTensor< float > b
Definition: DFT.cpp:157
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Definition: Error.h:160
cast configure & src
Definition: Cast.cpp:169

References ARM_COMPUTE_UNUSED, arm_compute::test::validation::b, arm_compute::test::validation::dst, arm_compute::test::validation::info, and arm_compute::test::validation::src.

Referenced by batch_normalization_layer().

◆ activation_layer() [2/3]

template SimpleTensor<float> arm_compute::test::validation::reference::activation_layer ( const SimpleTensor< float > &  src,
ActivationLayerInfo  info,
const QuantizationInfo oq_info 
)

◆ activation_layer() [3/3]

template SimpleTensor<half> arm_compute::test::validation::reference::activation_layer ( const SimpleTensor< half > &  src,
ActivationLayerInfo  info,
const QuantizationInfo oq_info 
)

◆ activation_layer< int16_t >()

SimpleTensor<int16_t> arm_compute::test::validation::reference::activation_layer< int16_t > ( const SimpleTensor< int16_t > &  src,
ActivationLayerInfo  info,
const QuantizationInfo oq_info 
)

Definition at line 69 of file ActivationLayer.cpp.

70 {
71  const QuantizationInfo dst_qinfo = oq_info.empty() ? src.quantization_info() : oq_info;
72 
73  SimpleTensor<float> src_tmp = convert_from_symmetric(src);
74  SimpleTensor<float> dst_tmp = activation_layer<float>(src_tmp, info);
75  SimpleTensor<int16_t> dst = convert_to_symmetric<int16_t>(dst_tmp, dst_qinfo);
76  return dst;
77 }
SimpleTensor< float > convert_from_symmetric(const SimpleTensor< int16_t > &src)
Definition: Helpers.cpp:149
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::convert_from_symmetric(), arm_compute::test::validation::dst, QuantizationInfo::empty(), arm_compute::test::validation::info, and arm_compute::test::validation::src.

◆ activation_layer< uint8_t >()

SimpleTensor<uint8_t> arm_compute::test::validation::reference::activation_layer< uint8_t > ( const SimpleTensor< uint8_t > &  src,
ActivationLayerInfo  info,
const QuantizationInfo oq_info 
)

Definition at line 58 of file ActivationLayer.cpp.

59 {
60  const QuantizationInfo dst_qinfo = oq_info.empty() ? src.quantization_info() : oq_info;
61 
62  SimpleTensor<float> src_tmp = convert_from_asymmetric(src);
63  SimpleTensor<float> dst_tmp = activation_layer<float>(src_tmp, info);
64  SimpleTensor<uint8_t> dst = convert_to_asymmetric(dst_tmp, dst_qinfo);
65  return dst;
66 }
SimpleTensor< uint8_t > convert_to_asymmetric(const SimpleTensor< float > &src, const QuantizationInfo &quantization_info)
Convert float simple tensor into quantized using specified quantization information.
Definition: Helpers.cpp:123
SimpleTensor< float > convert_from_asymmetric(const SimpleTensor< uint8_t > &src)
Convert quantized simple tensor into float using tensor quantization information.
Definition: Helpers.cpp:111
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::convert_from_asymmetric(), arm_compute::test::validation::convert_to_asymmetric(), arm_compute::test::validation::dst, QuantizationInfo::empty(), arm_compute::test::validation::info, and arm_compute::test::validation::src.

◆ arithmetic_division() [1/3]

SimpleTensor< T > arithmetic_division ( const SimpleTensor< T > &  src1,
const SimpleTensor< T > &  src2,
DataType  data_type 
)

Definition at line 76 of file ArithmeticDivision.cpp.

77 {
78  SimpleTensor<T> dst(TensorShape::broadcast_shape(src1.shape(), src2.shape()), data_type);
79 
80  Coordinates id_src1{};
81  Coordinates id_src2{};
82  Coordinates id_dst{};
83 
84  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(src1, src2, dst, id_src1, id_src2, id_dst);
85 
86  return dst;
87 }

References TensorShape::broadcast_shape(), arm_compute::test::validation::data_type, arm_compute::test::validation::dst, and SimpleTensor< T >::shape().

◆ arithmetic_division() [2/3]

template SimpleTensor<half> arm_compute::test::validation::reference::arithmetic_division ( const SimpleTensor< half > &  src1,
const SimpleTensor< half > &  src2,
DataType  data_type 
)

◆ arithmetic_division() [3/3]

template SimpleTensor<float> arm_compute::test::validation::reference::arithmetic_division ( const SimpleTensor< float > &  src1,
const SimpleTensor< float > &  src2,
DataType  data_type 
)

◆ arithmetic_operation() [1/13]

SimpleTensor< T > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< T > &  src1,
const SimpleTensor< T > &  src2,
SimpleTensor< T > &  dst,
ConvertPolicy  convert_policy 
)

Definition at line 89 of file ArithmeticOperations.cpp.

90 {
91  Coordinates id_src1{};
92  Coordinates id_src2{};
93  Coordinates id_dst{};
94 
95  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(op, src1, src2, dst, convert_policy, id_src1, id_src2, id_dst);
96 
97  return dst;
98 }

References arm_compute::test::validation::convert_policy, and arm_compute::test::validation::dst.

Referenced by laplacian_reconstruct().

◆ arithmetic_operation() [2/13]

SimpleTensor< uint8_t > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< uint8_t > &  src1,
const SimpleTensor< uint8_t > &  src2,
SimpleTensor< uint8_t > &  dst,
ConvertPolicy  convert_policy 
)

Definition at line 101 of file ArithmeticOperations.cpp.

102 {
103  Coordinates id_src1{};
104  Coordinates id_src2{};
105  Coordinates id_dst{};
106 
107  if(dst.data_type() == DataType::QASYMM8)
108  {
109  SimpleTensor<float> src1_tmp = convert_from_asymmetric(src1);
110  SimpleTensor<float> src2_tmp = convert_from_asymmetric(src2);
111  SimpleTensor<float> dst_tmp(TensorShape::broadcast_shape(src1.shape(), src2.shape()), dst.data_type());
112 
113  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(op, src1_tmp, src2_tmp, dst_tmp, convert_policy, id_src1, id_src2, id_dst);
114 
115  dst = convert_to_asymmetric(dst_tmp, dst.quantization_info());
116  return dst;
117  }
118  else
119  {
120  // DataType::U8
121  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(op, src1, src2, dst, convert_policy, id_src1, id_src2, id_dst);
122 
123  return dst;
124  }
125 }
TensorShape shape() const override
Shape of the tensor.
Definition: SimpleTensor.h:321
SimpleTensor< uint8_t > convert_to_asymmetric(const SimpleTensor< float > &src, const QuantizationInfo &quantization_info)
Convert float simple tensor into quantized using specified quantization information.
Definition: Helpers.cpp:123
SimpleTensor< float > convert_from_asymmetric(const SimpleTensor< uint8_t > &src)
Convert quantized simple tensor into float using tensor quantization information.
Definition: Helpers.cpp:111

References TensorShape::broadcast_shape(), arm_compute::test::validation::convert_from_asymmetric(), arm_compute::test::validation::convert_policy, arm_compute::test::validation::convert_to_asymmetric(), arm_compute::test::validation::dst, arm_compute::QASYMM8, and SimpleTensor< T >::shape().

◆ arithmetic_operation() [3/13]

SimpleTensor< int16_t > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< int16_t > &  src1,
const SimpleTensor< int16_t > &  src2,
SimpleTensor< int16_t > &  dst,
ConvertPolicy  convert_policy 
)

Definition at line 128 of file ArithmeticOperations.cpp.

129 {
130  Coordinates id_src1{};
131  Coordinates id_src2{};
132  Coordinates id_dst{};
133 
134  if(dst.data_type() == DataType::QSYMM16)
135  {
136  SimpleTensor<float> src1_tmp = convert_from_symmetric<int16_t>(src1);
137  SimpleTensor<float> src2_tmp = convert_from_symmetric<int16_t>(src2);
138  SimpleTensor<float> dst_tmp(TensorShape::broadcast_shape(src1.shape(), src2.shape()), dst.data_type());
139 
140  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(op, src1_tmp, src2_tmp, dst_tmp, convert_policy, id_src1, id_src2, id_dst);
141 
142  dst = convert_to_symmetric<int16_t>(dst_tmp, dst.quantization_info());
143  return dst;
144  }
145  else
146  {
147  // DataType::S16
148  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(op, src1, src2, dst, convert_policy, id_src1, id_src2, id_dst);
149  return dst;
150  }
151 }

References TensorShape::broadcast_shape(), arm_compute::test::validation::convert_policy, arm_compute::test::validation::dst, arm_compute::QSYMM16, and SimpleTensor< T >::shape().

◆ arithmetic_operation() [4/13]

template SimpleTensor< int8_t > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< int8_t > &  src1,
const SimpleTensor< int8_t > &  src2,
SimpleTensor< int8_t > &  dst,
ConvertPolicy  convert_policy 
)

◆ arithmetic_operation() [5/13]

template SimpleTensor< half > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< half > &  src1,
const SimpleTensor< half > &  src2,
SimpleTensor< half > &  dst,
ConvertPolicy  convert_policy 
)

◆ arithmetic_operation() [6/13]

template SimpleTensor< float > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< float > &  src1,
const SimpleTensor< float > &  src2,
SimpleTensor< float > &  dst,
ConvertPolicy  convert_policy 
)

◆ arithmetic_operation() [7/13]

SimpleTensor< T > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< T > &  src1,
const SimpleTensor< T > &  src2,
DataType  dst_data_type,
ConvertPolicy  convert_policy 
)

Definition at line 158 of file ArithmeticOperations.cpp.

159 {
160  ARM_COMPUTE_ERROR_ON_MSG(is_data_type_quantized(dst_data_type), "For quantized input data types, the quantized output tensor should be passed directly.");
161 
162  SimpleTensor<T> dst(TensorShape::broadcast_shape(src1.shape(), src2.shape()), dst_data_type);
163  arithmetic_operation<T>(op, src1, src2, dst, convert_policy);
164  return dst;
165 }
bool is_data_type_quantized(DataType dt)
Check if a given data type is of quantized type.
Definition: Utils.h:1010
#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)
Definition: Error.h:328

References ARM_COMPUTE_ERROR_ON_MSG, TensorShape::broadcast_shape(), arm_compute::test::validation::convert_policy, arm_compute::test::validation::dst, arm_compute::is_data_type_quantized(), and SimpleTensor< T >::shape().

◆ arithmetic_operation() [8/13]

template SimpleTensor< int16_t > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< int16_t > &  src1,
const SimpleTensor< int16_t > &  src2,
DataType  dst_data_type,
ConvertPolicy  convert_policy 
)

◆ arithmetic_operation() [9/13]

template SimpleTensor< int8_t > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< int8_t > &  src1,
const SimpleTensor< int8_t > &  src2,
DataType  dst_data_type,
ConvertPolicy  convert_policy 
)

◆ arithmetic_operation() [10/13]

template SimpleTensor< half > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< half > &  src1,
const SimpleTensor< half > &  src2,
DataType  dst_data_type,
ConvertPolicy  convert_policy 
)

◆ arithmetic_operation() [11/13]

template SimpleTensor< float > arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< float > &  src1,
const SimpleTensor< float > &  src2,
DataType  dst_data_type,
ConvertPolicy  convert_policy 
)

◆ arithmetic_operation() [12/13]

template SimpleTensor<int32_t> arm_compute::test::validation::reference::arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< int32_t > &  src1,
const SimpleTensor< int32_t > &  src2,
SimpleTensor< int32_t > &  dst,
ConvertPolicy  convert_policy 
)

◆ arithmetic_operation() [13/13]

template SimpleTensor<int32_t> arm_compute::test::validation::reference::arithmetic_operation ( ArithmeticOperation  op,
const SimpleTensor< int32_t > &  src1,
const SimpleTensor< int32_t > &  src2,
DataType  dst_data_type,
ConvertPolicy  convert_policy 
)

◆ batch_normalization_layer() [1/3]

SimpleTensor< T > batch_normalization_layer ( const SimpleTensor< T > &  src,
const SimpleTensor< T > &  mean,
const SimpleTensor< T > &  var,
const SimpleTensor< T > &  beta,
const SimpleTensor< T > &  gamma,
float  epsilon,
ActivationLayerInfo  act_info 
)

Definition at line 40 of file BatchNormalizationLayer.cpp.

42 {
43  SimpleTensor<T> result(src.shape(), src.data_type());
44 
45  const auto cols = static_cast<int>(src.shape()[0]);
46  const auto rows = static_cast<int>(src.shape()[1]);
47  const auto depth = static_cast<int>(src.shape()[2]);
48  const int upper_dims = src.shape().total_size() / (cols * rows * depth);
49 
50  for(int r = 0; r < upper_dims; ++r)
51  {
52  for(int i = 0; i < depth; ++i)
53  {
54  for(int k = 0; k < rows; ++k)
55  {
56  for(int l = 0; l < cols; ++l)
57  {
58  const int pos = l + k * cols + i * rows * cols + r * cols * rows * depth;
59  const float denominator = sqrt(var[i] + epsilon);
60  const float numerator = src[pos] - mean[i];
61  const float x_bar = numerator / denominator;
62  result[pos] = beta[i] + x_bar * gamma[i];
63  }
64  }
65  }
66  }
67 
68  if(act_info.enabled())
69  {
70  result = activation_layer(result, act_info);
71  }
72 
73  return result;
74 }
SimpleTensor< T > activation_layer(const SimpleTensor< T > &src, ActivationLayerInfo info, const QuantizationInfo &oq_info)
constexpr float epsilon
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::act_info, activation_layer(), epsilon, and arm_compute::test::validation::src.

◆ batch_normalization_layer() [2/3]

template SimpleTensor<float> arm_compute::test::validation::reference::batch_normalization_layer ( const SimpleTensor< float > &  src,
const SimpleTensor< float > &  mean,
const SimpleTensor< float > &  var,
const SimpleTensor< float > &  beta,
const SimpleTensor< float > &  gamma,
float  epsilon,
ActivationLayerInfo  act_info 
)

◆ batch_normalization_layer() [3/3]

template SimpleTensor<half> arm_compute::test::validation::reference::batch_normalization_layer ( const SimpleTensor< half > &  src,
const SimpleTensor< half > &  mean,
const SimpleTensor< half > &  var,
const SimpleTensor< half > &  beta,
const SimpleTensor< half > &  gamma,
float  epsilon,
ActivationLayerInfo  act_info 
)

◆ batch_to_space() [1/3]

SimpleTensor< T > batch_to_space ( const SimpleTensor< T > &  src,
const SimpleTensor< int32_t > &  block_shape,
const TensorShape dst_shape 
)

Definition at line 38 of file BatchToSpaceLayer.cpp.

39 {
40  ARM_COMPUTE_ERROR_ON(block_shape[0] <= 0);
41  ARM_COMPUTE_ERROR_ON(block_shape[1] <= 0);
42  SimpleTensor<T> result(dst_shape, src.data_type());
43 
44  int in_pos = 0;
45  const auto width_in = static_cast<int>(src.shape()[0]);
46  const auto height_in = static_cast<int>(src.shape()[1]);
47  const auto z_in = static_cast<int>(src.shape()[2]);
48  const auto batch_in = static_cast<int>(src.shape()[3]);
49 
50  for(int batch = 0; batch < batch_in; ++batch)
51  {
52  for(int z = 0; z < z_in; ++z)
53  {
54  for(int y = 0; y < height_in; ++y)
55  {
56  for(int x = 0; x < width_in; ++x)
57  {
58  const int r = src.shape()[3] / (block_shape[0] * block_shape[1]);
59  const int out_x = (block_shape[0] * x + (batch / r) % block_shape[0]);
60  const int out_y = (block_shape[1] * y + (batch / r) / block_shape[0]);
61  const int out_pos = out_x + dst_shape[0] * out_y + z * dst_shape[0] * dst_shape[1] + (batch % r) * dst_shape[0] * dst_shape[1] * dst_shape[2];
62  result[out_pos] = src[in_pos];
63  ++in_pos;
64  }
65  }
66  }
67  }
68 
69  return result;
70 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:337
cast configure & src
Definition: Cast.cpp:169

References ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::dst_shape, and arm_compute::test::validation::src.

◆ batch_to_space() [2/3]

template SimpleTensor<float> arm_compute::test::validation::reference::batch_to_space ( const SimpleTensor< float > &  src,
const SimpleTensor< int32_t > &  block_shape,
const TensorShape dst_shape 
)

◆ batch_to_space() [3/3]

template SimpleTensor<half> arm_compute::test::validation::reference::batch_to_space ( const SimpleTensor< half > &  src,
const SimpleTensor< int32_t > &  block_shape,
const TensorShape dst_shape 
)

◆ bitwise_and() [1/2]

SimpleTensor< T > bitwise_and ( const SimpleTensor< T > &  src1,
const SimpleTensor< T > &  src2 
)

Definition at line 35 of file BitwiseAnd.cpp.

36 {
37  SimpleTensor<T> dst(src1.shape(), src1.data_type());
38 
39  for(int i = 0; i < src1.num_elements(); ++i)
40  {
41  dst[i] = src1[i] & src2[i];
42  }
43 
44  return dst;
45 }

References SimpleTensor< T >::data_type(), arm_compute::test::validation::dst, SimpleTensor< T >::num_elements(), and SimpleTensor< T >::shape().

◆ bitwise_and() [2/2]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::bitwise_and ( const SimpleTensor< uint8_t > &  src1,
const SimpleTensor< uint8_t > &  src2 
)

◆ bitwise_not() [1/2]

SimpleTensor< T > bitwise_not ( const SimpleTensor< T > &  src)

Definition at line 35 of file BitwiseNot.cpp.

36 {
37  SimpleTensor<T> dst(src.shape(), src.data_type());
38 
39  for(int i = 0; i < src.num_elements(); ++i)
40  {
41  dst[i] = ~src[i];
42  }
43 
44  return dst;
45 }
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::dst, and arm_compute::test::validation::src.

◆ bitwise_not() [2/2]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::bitwise_not ( const SimpleTensor< uint8_t > &  src)

◆ bitwise_or() [1/2]

SimpleTensor< T > bitwise_or ( const SimpleTensor< T > &  src1,
const SimpleTensor< T > &  src2 
)

Definition at line 35 of file BitwiseOr.cpp.

36 {
37  SimpleTensor<T> dst(src1.shape(), src1.data_type());
38 
39  for(int i = 0; i < src1.num_elements(); ++i)
40  {
41  dst[i] = src1[i] | src2[i];
42  }
43 
44  return dst;
45 }

References SimpleTensor< T >::data_type(), arm_compute::test::validation::dst, SimpleTensor< T >::num_elements(), and SimpleTensor< T >::shape().

◆ bitwise_or() [2/2]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::bitwise_or ( const SimpleTensor< uint8_t > &  src1,
const SimpleTensor< uint8_t > &  src2 
)

◆ bitwise_xor() [1/2]

SimpleTensor< T > bitwise_xor ( const SimpleTensor< T > &  src1,
const SimpleTensor< T > &  src2 
)

Definition at line 35 of file BitwiseXor.cpp.

36 {
37  SimpleTensor<T> dst(src1.shape(), src1.data_type());
38 
39  for(int i = 0; i < src1.num_elements(); ++i)
40  {
41  dst[i] = src1[i] ^ src2[i];
42  }
43 
44  return dst;
45 }

References SimpleTensor< T >::data_type(), arm_compute::test::validation::dst, SimpleTensor< T >::num_elements(), and SimpleTensor< T >::shape().

◆ bitwise_xor() [2/2]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::bitwise_xor ( const SimpleTensor< uint8_t > &  src1,
const SimpleTensor< uint8_t > &  src2 
)

◆ bounding_box_transform() [1/3]

SimpleTensor< T > bounding_box_transform ( const SimpleTensor< T > &  boxes,
const SimpleTensor< T > &  deltas,
const BoundingBoxTransformInfo info 
)

Definition at line 40 of file BoundingBoxTransform.cpp.

41 {
42  const DataType boxes_data_type = deltas.data_type();
43  SimpleTensor<T> pred_boxes(deltas.shape(), boxes_data_type);
44 
45  const size_t num_classes = deltas.shape()[0] / 4;
46  const size_t num_boxes = deltas.shape()[1];
47  const T *deltas_ptr = deltas.data();
48  T *pred_boxes_ptr = pred_boxes.data();
49 
50  const int img_h = floor(info.img_height() / info.scale() + 0.5f);
51  const int img_w = floor(info.img_width() / info.scale() + 0.5f);
52 
53  const auto scale_after = (info.apply_scale() ? T(info.scale()) : T(1));
54  const auto scale_before = T(info.scale());
55  ARM_COMPUTE_ERROR_ON(scale_before <= 0);
56  const auto offset = (info.correct_transform_coords() ? T(1.f) : T(0.f));
57 
58  const size_t box_fields = 4;
59  const size_t class_fields = 4;
60 
61  for(size_t i = 0; i < num_boxes; ++i)
62  {
63  // Extract ROI information
64  const size_t start_box = box_fields * i;
65  const T width = (boxes[start_box + 2] / scale_before) - (boxes[start_box] / scale_before) + T(1.f);
66  const T height = (boxes[start_box + 3] / scale_before) - (boxes[start_box + 1] / scale_before) + T(1.f);
67  const T ctr_x = (boxes[start_box] / scale_before) + T(0.5f) * width;
68  const T ctr_y = (boxes[start_box + 1] / scale_before) + T(0.5f) * height;
69 
70  for(size_t j = 0; j < num_classes; ++j)
71  {
72  // Extract deltas
73  const size_t start_delta = i * num_classes * class_fields + class_fields * j;
74  const T dx = deltas_ptr[start_delta] / T(info.weights()[0]);
75  const T dy = deltas_ptr[start_delta + 1] / T(info.weights()[1]);
76  T dw = deltas_ptr[start_delta + 2] / T(info.weights()[2]);
77  T dh = deltas_ptr[start_delta + 3] / T(info.weights()[3]);
78 
79  // Clip dw and dh
80  dw = std::min(dw, T(info.bbox_xform_clip()));
81  dh = std::min(dh, T(info.bbox_xform_clip()));
82 
83  // Determine the predictions
84  const T pred_ctr_x = dx * width + ctr_x;
85  const T pred_ctr_y = dy * height + ctr_y;
86  const T pred_w = T(std::exp(dw)) * width;
87  const T pred_h = T(std::exp(dh)) * height;
88 
89  // Store the prediction into the output tensor
90  pred_boxes_ptr[start_delta] = scale_after * utility::clamp<T>(pred_ctr_x - T(0.5f) * pred_w, T(0), T(img_w - 1));
91  pred_boxes_ptr[start_delta + 1] = scale_after * utility::clamp<T>(pred_ctr_y - T(0.5f) * pred_h, T(0), T(img_h - 1));
92  pred_boxes_ptr[start_delta + 2] = scale_after * utility::clamp<T>(pred_ctr_x + T(0.5f) * pred_w - offset, T(0), T(img_w - 1));
93  pred_boxes_ptr[start_delta + 3] = scale_after * utility::clamp<T>(pred_ctr_y + T(0.5f) * pred_h - offset, T(0), T(img_h - 1));
94  }
95  }
96  return pred_boxes;
97 }
__global uchar * offset(const Image *img, int x, int y)
Get the pointer position of a Image.
Definition: helpers.h:328
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:337
DataType
Available data types.
Definition: Types.h:74

References ARM_COMPUTE_ERROR_ON, SimpleTensor< T >::data(), SimpleTensor< T >::data_type(), arm_compute::test::validation::info, offset(), and SimpleTensor< T >::shape().

◆ bounding_box_transform() [2/3]

template SimpleTensor<float> arm_compute::test::validation::reference::bounding_box_transform ( const SimpleTensor< float > &  boxes,
const SimpleTensor< float > &  deltas,
const BoundingBoxTransformInfo info 
)

◆ bounding_box_transform() [3/3]

template SimpleTensor<half> arm_compute::test::validation::reference::bounding_box_transform ( const SimpleTensor< half > &  boxes,
const SimpleTensor< half > &  deltas,
const BoundingBoxTransformInfo info 
)

◆ box3x3() [1/2]

SimpleTensor< T > box3x3 ( const SimpleTensor< T > &  src,
BorderMode  border_mode,
constant_border_value 
)

Definition at line 38 of file Box3x3.cpp.

39 {
40  SimpleTensor<T> dst(src.shape(), src.data_type());
41  const std::array<T, 9> filter{ { 1, 1, 1, 1, 1, 1, 1, 1, 1 } };
42  const float scale = 1.f / static_cast<float>(filter.size());
43  for(int element_idx = 0; element_idx < src.num_elements(); ++element_idx)
44  {
45  const Coordinates id = index2coord(src.shape(), element_idx);
46  apply_2d_spatial_filter(id, src, dst, TensorShape(3U, 3U), filter.data(), scale, border_mode, constant_border_value);
47  }
48  return dst;
49 }
void apply_2d_spatial_filter(Coordinates coord, const SimpleTensor< T > &src, SimpleTensor< U > &dst, const TensorShape &filter_shape, const V *filter_itr, double scale, BorderMode border_mode, T constant_border_value=T(0))
Definition: Utils.h:98
Coordinates index2coord(const TensorShape &shape, int index)
Convert a linear index into n-dimensional coordinates.
Definition: Utils.h:451
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::apply_2d_spatial_filter(), arm_compute::test::validation::border_mode, arm_compute::test::validation::dst, arm_compute::test::index2coord(), scale(), and arm_compute::test::validation::src.

◆ box3x3() [2/2]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::box3x3 ( const SimpleTensor< uint8_t > &  src,
BorderMode  border_mode,
uint8_t  constant_border_value 
)

◆ canny_edge_detector() [1/2]

SimpleTensor< T > canny_edge_detector ( const SimpleTensor< T > &  src,
int32_t  upper_thresh,
int32_t  lower_thresh,
int  gradient_size,
MagnitudeType  norm_type,
BorderMode  border_mode,
constant_border_value 
)

Definition at line 234 of file CannyEdgeDetector.cpp.

237 {
238  if(gradient_size < 7)
239  {
240  return canny_edge_detector_impl<int16_t>(src, upper_thresh, lower_thresh, gradient_size, norm_type, border_mode, constant_border_value);
241  }
242  else
243  {
244  return canny_edge_detector_impl<int32_t>(src, upper_thresh, lower_thresh, gradient_size, norm_type, border_mode, constant_border_value);
245  }
246 }
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::border_mode, and arm_compute::test::validation::src.

◆ canny_edge_detector() [2/2]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::canny_edge_detector ( const SimpleTensor< uint8_t > &  src,
int32_t  upper_thresh,
int32_t  lower_thresh,
int  gradient_size,
MagnitudeType  norm_type,
BorderMode  border_mode,
uint8_t  constant_border_value 
)

◆ channel_combine() [1/2]

std::vector< SimpleTensor< T > > channel_combine ( const TensorShape shape,
const std::vector< SimpleTensor< T >> &  image_planes,
Format  format 
)

Definition at line 91 of file ChannelCombine.cpp.

92 {
93  std::vector<SimpleTensor<T>> dst = create_image_planes<T>(shape, format);
94 
95  for(unsigned int plane_idx = 0; plane_idx < dst.size(); ++plane_idx)
96  {
97  SimpleTensor<T> &dst_tensor = dst[plane_idx];
98 
99  for(int element_idx = 0; element_idx < dst_tensor.num_elements(); ++element_idx)
100  {
101  Coordinates coord = index2coord(dst_tensor.shape(), element_idx);
102 
103  switch(format)
104  {
105  case Format::RGB888:
106  case Format::RGBA8888:
107  {
108  // Copy R/G/B or A channel
109  for(int channel_idx = 0; channel_idx < dst_tensor.num_channels(); ++channel_idx)
110  {
111  const T &src_value = reinterpret_cast<const T *>(image_planes[channel_idx](coord))[0];
112  T &dst_value = reinterpret_cast<T *>(dst_tensor(coord))[channel_idx];
113 
114  dst_value = src_value;
115  }
116  break;
117  }
118  case Format::YUYV422:
119  case Format::UYVY422:
120  {
121  // Find coordinates of the sub-sampled pixel
122  const Coordinates coord_hori(coord.x() / 2, coord.y());
123 
124  const T &src0 = reinterpret_cast<const T *>(image_planes[0](coord))[0];
125  const T &src1 = reinterpret_cast<const T *>(image_planes[1](coord_hori))[0];
126 
127  const int shift = (Format::YUYV422 == format) ? 1 : 0;
128  T &dst0 = reinterpret_cast<T *>(dst_tensor(coord))[1 - shift];
129  T &dst1 = reinterpret_cast<T *>(dst_tensor(coord))[0 + shift];
130 
131  dst0 = src0;
132  dst1 = src1;
133 
134  Coordinates coord2 = index2coord(dst_tensor.shape(), ++element_idx);
135 
136  const T &src2 = reinterpret_cast<const T *>(image_planes[0](coord2))[0];
137  const T &src3 = reinterpret_cast<const T *>(image_planes[2](coord_hori))[0];
138 
139  T &dst2 = reinterpret_cast<T *>(dst_tensor(coord2))[1 - shift];
140  T &dst3 = reinterpret_cast<T *>(dst_tensor(coord2))[0 + shift];
141 
142  dst2 = src2;
143  dst3 = src3;
144 
145  break;
146  }
147  case Format::NV12:
148  case Format::NV21:
149  {
150  if(0U == plane_idx)
151  {
152  // Get and combine Y channel from plane0 of destination multi-image
153  dst_tensor[element_idx] = image_planes[0][element_idx];
154  }
155  else
156  {
157  const int shift = (Format::NV12 == format) ? 0 : 1;
158 
159  // Get U channel from plane1 and V channel from plane2 of the source
160  const T &src_u0 = reinterpret_cast<const T *>(image_planes[1](coord))[0];
161  const T &src_v0 = reinterpret_cast<const T *>(image_planes[2](coord))[0];
162 
163  // Get U and V channel from plane1 of destination multi-image
164  T &dst_u0 = reinterpret_cast<T *>(dst_tensor(coord))[0 + shift];
165  T &dst_v0 = reinterpret_cast<T *>(dst_tensor(coord))[1 - shift];
166 
167  // Combine channel U and V
168  dst_u0 = src_u0;
169  dst_v0 = src_v0;
170  }
171 
172  break;
173  }
174  case Format::IYUV:
175  case Format::YUV444:
176  {
177  // Get Y/U/V element
178  const T &src = reinterpret_cast<const T *>(image_planes[plane_idx](coord))[0];
179  T &dst = reinterpret_cast<T *>(dst_tensor(coord))[0];
180 
181  // Copy Y/U/V plane
182  dst = src;
183 
184  break;
185  }
186  default:
187  ARM_COMPUTE_ERROR("Not supported");
188  break;
189  }
190  }
191  }
192 
193  return dst;
194 }
#define ARM_COMPUTE_ERROR(...)
Print the given message then throw an std::runtime_error.
Definition: Error.h:261
Coordinates index2coord(const TensorShape &shape, int index)
Convert a linear index into n-dimensional coordinates.
Definition: Utils.h:451
cast configure & src
Definition: Cast.cpp:169

References ARM_COMPUTE_ERROR, arm_compute::test::validation::dst, arm_compute::test::index2coord(), arm_compute::IYUV, SimpleTensor< T >::num_channels(), SimpleTensor< T >::num_elements(), arm_compute::NV12, arm_compute::NV21, arm_compute::RGB888, arm_compute::RGBA8888, arm_compute::test::validation::shape, SimpleTensor< T >::shape(), arm_compute::test::validation::shift, arm_compute::test::validation::src, arm_compute::UYVY422, Dimensions< T >::x(), Dimensions< T >::y(), arm_compute::YUV444, and arm_compute::YUYV422.

◆ channel_combine() [2/2]

template std::vector<SimpleTensor<uint8_t> > arm_compute::test::validation::reference::channel_combine ( const TensorShape shape,
const std::vector< SimpleTensor< uint8_t >> &  image_planes,
Format  format 
)

◆ channel_extract() [1/2]

SimpleTensor< uint8_t > channel_extract ( const TensorShape shape,
const std::vector< SimpleTensor< T >> &  tensor_planes,
Format  format,
Channel  channel 
)

Definition at line 38 of file ChannelExtract.cpp.

39 {
40  // Find plane and channel index
41  const unsigned int plane_idx = plane_idx_from_channel(format, channel);
42  const unsigned int channel_idx = channel_idx_from_format(format, channel);
43 
44  // Create dst and get src tensor
45  SimpleTensor<T> src = tensor_planes[plane_idx];
46  SimpleTensor<T> dst{ calculate_subsampled_shape(shape, format, channel), Format::U8 };
47 
48  // Single planar formats with subsampling require a double horizontal step
49  const int step_x = ((Format::YUYV422 == format || Format::UYVY422 == format) && Channel::Y != channel) ? 2 : 1;
50  const int width = dst.shape().x();
51  const int height = dst.shape().y();
52 
53  // Loop over each pixel and extract channel
54  for(int y = 0; y < height; ++y)
55  {
56  for(int x = 0; x < width; ++x)
57  {
58  const Coordinates src_coord{ x * step_x, y };
59  const Coordinates dst_coord{ x, y };
60 
61  const auto *src_pixel = reinterpret_cast<const T *>(src(src_coord));
62  auto *dst_pixel = reinterpret_cast<T *>(dst(dst_coord));
63 
64  dst_pixel[0] = src_pixel[channel_idx]; // NOLINT
65  }
66  }
67 
68  return dst;
69 }
int plane_idx_from_channel(Format format, Channel channel)
Return the plane index of a given channel given an input format.
Definition: Utils.h:256
TensorShape calculate_subsampled_shape(const TensorShape &shape, Format format, Channel channel=Channel::UNKNOWN)
Calculate subsampled shape for a given format and channel.
Definition: Utils.h:684
int channel_idx_from_format(Format format, Channel channel)
Return the channel index of a given channel given an input format.
Definition: Utils.h:320
cast configure & src
Definition: Cast.cpp:169

References arm_compute::calculate_subsampled_shape(), arm_compute::channel_idx_from_format(), arm_compute::test::validation::dst, arm_compute::plane_idx_from_channel(), arm_compute::test::validation::shape, arm_compute::test::validation::src, arm_compute::U8, arm_compute::UYVY422, arm_compute::Y, and arm_compute::YUYV422.

◆ channel_extract() [2/2]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::channel_extract ( const TensorShape shape,
const std::vector< SimpleTensor< uint8_t >> &  tensor_planes,
Format  format,
Channel  channel 
)

◆ channel_shuffle() [1/6]

SimpleTensor< T > channel_shuffle ( const SimpleTensor< T > &  src,
int  num_groups 
)

Definition at line 39 of file ChannelShuffle.cpp.

40 {
41  // Create reference
42  SimpleTensor<T> dst{ src.shape(), src.data_type(), src.num_channels(), src.quantization_info() };
43 
44  const int M = src.shape()[0];
45  const int N = src.shape()[1];
46  const int num_channels = src.shape()[2];
47  const int batches = src.shape()[3];
48  const int MxN = M * N;
49  const int channels_in_group = num_channels / num_groups;
50 
51  const T *src_ref = src.data();
52  T *dst_ref = dst.data();
53 
54  for(int n = 0; n < batches; ++n)
55  {
56  for(int g = 0; g < num_groups; ++g)
57  {
58  // Gather the group g block (of size channels_in_group * MxN) from output channels
59  // g + 0 * G, g + 1 * G, g + 2 * G, g + G * (K - 1) etc.
60  const T *src_ptr = src_ref + g * channels_in_group * MxN + n * num_channels * MxN;
61  T *dst_ptr = dst_ref + g * MxN + n * num_channels * MxN;
62  for(int i = 0; i < channels_in_group; ++i)
63  {
64  std::copy(src_ptr + i * MxN,
65  src_ptr + (i + 1) * MxN,
66  dst_ptr + i * num_groups * MxN);
67  }
68  }
69  }
70 
71  return dst;
72 }
SimpleTensor< T > copy(const SimpleTensor< T > &src, const TensorShape &output_shape)
Definition: Copy.cpp:37
const unsigned int num_groups
Definition: Im2Col.cpp:148
SimpleTensor< float > src_ref
Definition: Im2Col.cpp:187
cast configure & src
Definition: Cast.cpp:169

References copy(), arm_compute::test::validation::dst, arm_compute::test::validation::dst_ref, arm_compute::test::validation::num_groups, arm_compute::test::validation::src, and arm_compute::test::validation::src_ref.

◆ channel_shuffle() [2/6]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::channel_shuffle ( const SimpleTensor< uint8_t > &  src,
int  num_groups 
)

◆ channel_shuffle() [3/6]

template SimpleTensor<uint16_t> arm_compute::test::validation::reference::channel_shuffle ( const SimpleTensor< uint16_t > &  src,
int  num_groups 
)

◆ channel_shuffle() [4/6]

template SimpleTensor<uint32_t> arm_compute::test::validation::reference::channel_shuffle ( const SimpleTensor< uint32_t > &  src,
int  num_groups 
)

◆ channel_shuffle() [5/6]

template SimpleTensor<half> arm_compute::test::validation::reference::channel_shuffle ( const SimpleTensor< half > &  src,
int  num_groups 
)

◆ channel_shuffle() [6/6]

template SimpleTensor<float> arm_compute::test::validation::reference::channel_shuffle ( const SimpleTensor< float > &  src,
int  num_groups 
)

◆ col2im() [1/4]

SimpleTensor< T > col2im ( const SimpleTensor< T > &  src,
const TensorShape dst_shape,
unsigned int  num_groups 
)

Definition at line 38 of file Col2Im.cpp.

39 {
40  SimpleTensor<T> dst{ dst_shape, src.data_type(), 1 };
41 
42  // Compute reference
43  const size_t batches = dst_shape.total_size() / (dst_shape.x() * dst_shape.y() * dst_shape.z());
44  const size_t src_width = src.shape().x();
45  const size_t src_height = src.shape().y();
46 
47  if(num_groups == 1)
48  {
49  // Batches are on the 3rd dimension of the input tensor
50  int dst_idx = 0;
51  for(size_t b = 0; b < batches; ++b)
52  {
53  for(size_t x = 0; x < src_width; ++x)
54  {
55  for(size_t y = 0; y < src_height; ++y)
56  {
57  dst[dst_idx++] = src[coord2index(src.shape(), Coordinates(x, y, b))];
58  }
59  }
60  }
61  }
62  else
63  {
64  int dst_idx = 0;
65  for(size_t b = 0; b < batches; ++b)
66  {
67  for(size_t g = 0; g < num_groups; ++g)
68  {
69  for(size_t x = 0; x < src_width; ++x)
70  {
71  for(size_t y = 0; y < src_height; ++y)
72  {
73  dst[dst_idx++] = src[coord2index(src.shape(), Coordinates(x, y, g, b))];
74  }
75  }
76  }
77  }
78  }
79  return dst;
80 }
SimpleTensor< float > b
Definition: DFT.cpp:157
int coord2index(const TensorShape &shape, const Coordinates &coord)
Linearise the given coordinate.
Definition: Utils.h:480
T x() const
Alias to access the size of the first dimension.
Definition: Dimensions.h:81
T z() const
Alias to access the size of the third dimension.
Definition: Dimensions.h:91
const unsigned int num_groups
Definition: Im2Col.cpp:148
size_t total_size() const
Collapses all dimensions to a single linear total size.
Definition: TensorShape.h:171
T y() const
Alias to access the size of the second dimension.
Definition: Dimensions.h:86
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::b, arm_compute::test::coord2index(), arm_compute::test::validation::dst, arm_compute::test::validation::dst_shape, arm_compute::test::validation::num_groups, arm_compute::test::validation::src, TensorShape::total_size(), Dimensions< T >::x(), Dimensions< T >::y(), and Dimensions< T >::z().

◆ col2im() [2/4]

template SimpleTensor<float> arm_compute::test::validation::reference::col2im ( const SimpleTensor< float > &  src,
const TensorShape dst_shape,
unsigned int  num_groups 
)

◆ col2im() [3/4]

template SimpleTensor<half> arm_compute::test::validation::reference::col2im ( const SimpleTensor< half > &  src,
const TensorShape dst_shape,
unsigned int  num_groups 
)

◆ col2im() [4/4]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::col2im ( const SimpleTensor< uint8_t > &  src,
const TensorShape dst_shape,
unsigned int  num_groups 
)

◆ color_convert() [1/2]

std::vector< SimpleTensor< T > > color_convert ( const TensorShape shape,
const std::vector< SimpleTensor< T >> &  tensor_planes,
Format  src_format,
Format  dst_format 
)

Definition at line 93 of file ColorConvert.cpp.

94 {
95  std::vector<SimpleTensor<T>> dst = create_image_planes<T>(shape, dst_format);
96 
97  switch(src_format)
98  {
99  case Format::RGB888:
100  {
101  switch(dst_format)
102  {
103  case Format::RGBA8888:
105  break;
106  case Format::U8:
108  break;
109  case Format::NV12:
111  break;
112  case Format::IYUV:
114  break;
115  case Format::YUV444:
117  break;
118  default:
119  ARM_COMPUTE_ERROR("Not Supported");
120  break;
121  }
122  break;
123  }
124  case Format::RGBA8888:
125  {
126  switch(dst_format)
127  {
128  case Format::RGB888:
130  break;
131  case Format::NV12:
133  break;
134  case Format::IYUV:
136  break;
137  case Format::YUV444:
139  break;
140  default:
141  ARM_COMPUTE_ERROR("Not Supported");
142  break;
143  }
144  break;
145  }
146  case Format::UYVY422:
147  case Format::YUYV422:
148  {
149  switch(dst_format)
150  {
151  case Format::RGB888:
152  case Format::RGBA8888:
153  colorconvert_helper::detail::colorconvert_yuyv_to_rgb(tensor_planes[0], src_format, dst[0]);
154  break;
155  case Format::NV12:
156  colorconvert_helper::detail::colorconvert_yuyv_to_nv12(tensor_planes[0], src_format, dst);
157  break;
158  case Format::IYUV:
159  colorconvert_helper::detail::colorconvert_yuyv_to_iyuv(tensor_planes[0], src_format, dst);
160  break;
161  default:
162  ARM_COMPUTE_ERROR("Not Supported");
163  break;
164  }
165  break;
166  }
167  case Format::IYUV:
168  {
169  switch(dst_format)
170  {
171  case Format::RGB888:
172  case Format::RGBA8888:
174  break;
175  default:
176  ARM_COMPUTE_ERROR("Not Supported");
177  break;
178  }
179  break;
180  }
181  case Format::NV12:
182  case Format::NV21:
183  {
184  switch(dst_format)
185  {
186  case Format::RGB888:
187  case Format::RGBA8888:
188  colorconvert_helper::detail::colorconvert_nv12_to_rgb(shape, src_format, tensor_planes, dst[0]);
189  break;
190  case Format::IYUV:
191  colorconvert_helper::detail::colorconvert_nv_to_iyuv(tensor_planes, src_format, dst);
192  break;
193  case Format::YUV444:
194  colorconvert_helper::detail::colorconvert_nv_to_yuv4(tensor_planes, src_format, dst);
195  break;
196  default:
197  ARM_COMPUTE_ERROR("Not Supported");
198  break;
199  }
200  break;
201  }
202  default:
203  ARM_COMPUTE_ERROR("Not supported");
204  break;
205  }
206  return dst;
207 }
#define ARM_COMPUTE_ERROR(...)
Print the given message then throw an std::runtime_error.
Definition: Error.h:261
void colorconvert_nv_to_iyuv(const std::vector< SimpleTensor< T >> src, const Format src_format, std::vector< SimpleTensor< T >> &dst)
void colorconvert_rgb_to_yuv4(const void *__restrict input, void *__restrict output, const Window &win)
Convert RGB to YUV4.
void colorconvert_rgbx_to_rgb(const void *input, void *output, const Window &win)
Convert RGBX to RGB.
void colorconvert_nv_to_yuv4(const std::vector< SimpleTensor< T >> src, const Format src_format, std::vector< SimpleTensor< T >> &dst)
void colorconvert_rgb_to_u8(const void *__restrict input, void *__restrict output, const Window &win)
Convert RGB to U8.
void colorconvert_rgb_to_iyuv(const void *__restrict input, void *__restrict output, const Window &win)
Convert RGB to IYUV.
void colorconvert_rgb_to_rgbx(const void *__restrict input, void *__restrict output, const Window &win)
Convert RGB to RGBX.
void colorconvert_nv12_to_rgb(const void *__restrict input, void *__restrict output, const Window &win)
Convert NV12 to RGB.
void colorconvert_yuyv_to_rgb(const void *__restrict input, void *__restrict output, const Window &win)
Convert YUYV to RGB.
void colorconvert_rgb_to_nv12(const void *__restrict input, void *__restrict output, const Window &win)
Convert RGB to NV12.
void colorconvert_yuyv_to_iyuv(const void *__restrict input, void *__restrict output, const Window &win)
Convert YUYV to IYUV.
void colorconvert_yuyv_to_nv12(const void *__restrict input, void *__restrict output, const Window &win)
Convert YUYV to NV12.
void colorconvert_iyuv_to_rgb(const void *__restrict input, void *__restrict output, const Window &win)
Convert IYUV to RGB.

References ARM_COMPUTE_ERROR, arm_compute::test::colorconvert_helper::detail::colorconvert_iyuv_to_rgb(), arm_compute::test::colorconvert_helper::detail::colorconvert_nv12_to_rgb(), arm_compute::test::colorconvert_helper::detail::colorconvert_nv_to_iyuv(), arm_compute::test::colorconvert_helper::detail::colorconvert_nv_to_yuv4(), arm_compute::test::colorconvert_helper::detail::colorconvert_rgb_to_iyuv(), arm_compute::test::colorconvert_helper::detail::colorconvert_rgb_to_nv12(), arm_compute::test::colorconvert_helper::detail::colorconvert_rgb_to_rgbx(), arm_compute::test::colorconvert_helper::detail::colorconvert_rgb_to_u8(), arm_compute::test::colorconvert_helper::detail::colorconvert_rgb_to_yuv4(), arm_compute::test::colorconvert_helper::detail::colorconvert_rgbx_to_rgb(), arm_compute::test::colorconvert_helper::detail::colorconvert_yuyv_to_iyuv(), arm_compute::test::colorconvert_helper::detail::colorconvert_yuyv_to_nv12(), arm_compute::test::colorconvert_helper::detail::colorconvert_yuyv_to_rgb(), arm_compute::test::validation::dst, arm_compute::IYUV, arm_compute::NV12, arm_compute::NV21, arm_compute::RGB888, arm_compute::RGBA8888, arm_compute::test::validation::shape, arm_compute::U8, arm_compute::UYVY422, arm_compute::YUV444, and arm_compute::YUYV422.

◆ color_convert() [2/2]

template std::vector<SimpleTensor<uint8_t> > arm_compute::test::validation::reference::color_convert ( const TensorShape shape,
const std::vector< SimpleTensor< uint8_t >> &  tensor_planes,
Format  src_format,
Format  dst_format 
)

◆ compare() [1/4]

SimpleTensor< uint8_t > compare ( ComparisonOperation  op,
const SimpleTensor< T > &  src1,
const SimpleTensor< T > &  src2 
)

Definition at line 108 of file Comparisons.cpp.

109 {
110  SimpleTensor<uint8_t> dst(TensorShape::broadcast_shape(src1.shape(), src2.shape()), DataType::U8);
111 
112  Coordinates id_src1{};
113  Coordinates id_src2{};
114  Coordinates id_dst{};
115  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(op, src1, src2, dst, id_src1, id_src2, id_dst);
116  return dst;
117 }

References TensorShape::broadcast_shape(), arm_compute::test::validation::dst, SimpleTensor< T >::shape(), and arm_compute::U8.

◆ compare() [2/4]

SimpleTensor<uint8_t> arm_compute::test::validation::reference::compare ( ComparisonOperation  op,
const SimpleTensor< uint8_t > &  src1,
const SimpleTensor< uint8_t > &  src2 
)

Definition at line 120 of file Comparisons.cpp.

121 {
122  SimpleTensor<uint8_t> dst(TensorShape::broadcast_shape(src1.shape(), src2.shape()), DataType::U8);
123 
124  Coordinates id_src1{};
125  Coordinates id_src2{};
126  Coordinates id_dst{};
127 
128  if(src1.data_type() == DataType::QASYMM8)
129  {
130  SimpleTensor<float> src1_tmp = convert_from_asymmetric(src1);
131  SimpleTensor<float> src2_tmp = convert_from_asymmetric(src2);
132  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(op, src1_tmp, src2_tmp, dst, id_src1, id_src2, id_dst);
133  }
134  else
135  {
136  // DataType::U8
137  BroadcastUnroll<Coordinates::num_max_dimensions>::unroll(op, src1, src2, dst, id_src1, id_src2, id_dst);
138  }
139  return dst;
140 }
DataType data_type() const override
Data type of the tensor.
Definition: SimpleTensor.h:358
TensorShape shape() const override
Shape of the tensor.
Definition: SimpleTensor.h:321
SimpleTensor< float > convert_from_asymmetric(const SimpleTensor< uint8_t > &src)
Convert quantized simple tensor into float using tensor quantization information.
Definition: Helpers.cpp:111

References TensorShape::broadcast_shape(), arm_compute::test::validation::convert_from_asymmetric(), SimpleTensor< T >::data_type(), arm_compute::test::validation::dst, arm_compute::QASYMM8, SimpleTensor< T >::shape(), and arm_compute::U8.

◆ compare() [3/4]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::compare ( ComparisonOperation  op,
const SimpleTensor< half > &  src1,
const SimpleTensor< half > &  src2 
)

◆ compare() [4/4]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::compare ( ComparisonOperation  op,
const SimpleTensor< float > &  src1,
const SimpleTensor< float > &  src2 
)

◆ compute_all_anchors() [1/3]

SimpleTensor< T > compute_all_anchors ( const SimpleTensor< T > &  anchors,
const ComputeAnchorsInfo info 
)

Definition at line 40 of file ComputeAllAnchors.cpp.

41 {
42  const int num_anchors = anchors.shape()[1];
43  const auto width = int(info.feat_width());
44  const auto height = int(info.feat_height());
45  const float stride = 1. / info.spatial_scale();
46 
47  SimpleTensor<T> all_anchors(TensorShape(4, width * height * num_anchors), anchors.data_type());
48  const T *anchors_ptr = anchors.data();
49  T *all_anchors_ptr = all_anchors.data();
50 
51  // Iterate over the input grid and anchors
52  for(int y = 0; y < height; y++)
53  {
54  for(int x = 0; x < width; x++)
55  {
56  for(int a = 0; a < num_anchors; a++)
57  {
58  const T shift_x = T(x) * T(stride);
59  const T shift_y = T(y) * T(stride);
60  const size_t anchor_id = a + x * num_anchors + y * width * num_anchors;
61  // x1
62  all_anchors_ptr[anchor_id * 4] = anchors_ptr[4 * a] + shift_x;
63  // y1
64  all_anchors_ptr[anchor_id * 4 + 1] = anchors_ptr[4 * a + 1] + shift_y;
65  // x2
66  all_anchors_ptr[anchor_id * 4 + 2] = anchors_ptr[4 * a + 2] + shift_x;
67  // y2
68  all_anchors_ptr[anchor_id * 4 + 3] = anchors_ptr[4 * a + 3] + shift_y;
69  }
70  }
71  }
72  return all_anchors;
73 }

References SimpleTensor< T >::data(), SimpleTensor< T >::data_type(), arm_compute::test::validation::info, and SimpleTensor< T >::shape().

◆ compute_all_anchors() [2/3]

template SimpleTensor<float> arm_compute::test::validation::reference::compute_all_anchors ( const SimpleTensor< float > &  anchors,
const ComputeAnchorsInfo info 
)

◆ compute_all_anchors() [3/3]

template SimpleTensor<half> arm_compute::test::validation::reference::compute_all_anchors ( const SimpleTensor< half > &  anchors,
const ComputeAnchorsInfo info 
)

◆ compute_min_max()

void arm_compute::test::validation::reference::compute_min_max ( const SimpleTensor< T > &  src,
T &  min,
T &  max 
)

Definition at line 35 of file MinMaxLocation.cpp.

36 {
37  // Set min and max to first pixel
38  min = src[0];
39  max = src[0];
40 
41  ARM_COMPUTE_ERROR_ON(src.num_elements() == 0);
42 
43  // Look for min and max values
44  for(int i = 1; i < src.num_elements(); ++i)
45  {
46  if(src[i] < min)
47  {
48  min = src[i];
49  }
50  if(src[i] > max)
51  {
52  max = src[i];
53  }
54  }
55 }
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:337
cast configure & src
Definition: Cast.cpp:169

References ARM_COMPUTE_ERROR_ON, and arm_compute::test::validation::src.

◆ compute_reduction_operation()

SimpleTensor<OT> arm_compute::test::validation::reference::compute_reduction_operation ( const SimpleTensor< T > &  src,
const TensorShape dst_shape,
unsigned int  axis,
ReductionOperation  op 
)

Definition at line 178 of file ReductionOperation.cpp.

179 {
180  // Create reference
181  const bool is_arg_min_max = (op == ReductionOperation::ARG_IDX_MIN || op == ReductionOperation::ARG_IDX_MAX);
182  DataType output_data_type = is_arg_min_max ? DataType::U32 : src.data_type();
183  SimpleTensor<OT> dst{ dst_shape, output_data_type, 1, src.quantization_info() };
184  const unsigned int src_width = src.shape().x();
185  const unsigned int src_height = src.shape().y();
186  const unsigned int src_depth = src.shape().z();
187  const unsigned int src_batch = src.shape()[3];
188  const int reduce_elems = src.shape()[axis];
189 
190  switch(axis)
191  {
192  case 0:
193  {
194  const unsigned int upper_dims = src.shape().total_size_upper(1);
195  for(unsigned int du = 0; du < upper_dims; ++du)
196  {
197  const T *src_row_ptr = src.data() + du * reduce_elems;
198  dst[du] = is_arg_min_max ?
199  reduce_operation_arg_min_max<T, OT>(src_row_ptr, reduce_elems, op, 1) :
200  reduce_operation<T, OT>(src_row_ptr, reduce_elems, op, 1);
201  }
202  }
203  break;
204  case 1:
205  {
206  const unsigned int upper_dims = src.shape().total_size_upper(2);
207  for(unsigned int du = 0; du < upper_dims; ++du)
208  {
209  for(unsigned int x = 0; x < src_width; ++x)
210  {
211  const int in_offset = du * src_height * src_width + x;
212  const int out_offset = du * src_width + x;
213  const T *src_row_ptr = src.data() + in_offset;
214  dst[out_offset] = is_arg_min_max ?
215  reduce_operation_arg_min_max<T, OT>(src_row_ptr, reduce_elems, op, src_width) :
216  reduce_operation<T, OT>(src_row_ptr, reduce_elems, op, src_width);
217  }
218  }
219  }
220  break;
221  case 2:
222  {
223  const unsigned int upper_dims = src.shape().total_size_upper(3);
224  for(unsigned int du = 0; du < upper_dims; ++du)
225  {
226  for(unsigned int x = 0; x < src_width; ++x)
227  {
228  for(unsigned int y = 0; y < src_height; ++y)
229  {
230  const int in_offset = du * src_depth * src_height * src_width + y * src_width + x;
231  const int out_offset = du * src_width * src_height + y * src_width + x;
232  const T *src_row_ptr = src.data() + in_offset;
233  dst[out_offset] = is_arg_min_max ?
234  reduce_operation_arg_min_max<T, OT>(src_row_ptr, reduce_elems, op, src_width * src_height) :
235  reduce_operation<T, OT>(src_row_ptr, reduce_elems, op, src_width * src_height);
236  }
237  }
238  }
239  }
240  break;
241  case 3:
242  {
243  const unsigned int upper_dims = src.shape().total_size_upper(4);
244  for(unsigned int du = 0; du < upper_dims; ++du)
245  {
246  for(unsigned int z = 0; z < src_depth; ++z)
247  {
248  for(unsigned int y = 0; y < src_height; ++y)
249  {
250  for(unsigned int x = 0; x < src_width; ++x)
251  {
252  const int in_offset = du * src_batch * src_depth * src_height * src_width + z * src_width * src_height + y * src_width + x;
253  const int out_offset = du * src_depth * src_height * src_width + z * src_width * src_height + y * src_width + x;
254  const T *src_row_ptr = src.data() + in_offset;
255  dst[out_offset] = is_arg_min_max ?
256  reduce_operation_arg_min_max<T, OT>(src_row_ptr, reduce_elems, op, src_width * src_height * src_depth) :
257  reduce_operation<T, OT>(src_row_ptr, reduce_elems, op, src_width * src_height * src_depth);
258  }
259  }
260  }
261  }
262  }
263  break;
264  default:
265  ARM_COMPUTE_ERROR("Unsupported reduction axis");
266  }
267 
268  return dst;
269 }
#define ARM_COMPUTE_ERROR(...)
Print the given message then throw an std::runtime_error.
Definition: Error.h:261
DataType
Available data types.
Definition: Types.h:74
cast configure & src
Definition: Cast.cpp:169

References arm_compute::ARG_IDX_MAX, arm_compute::ARG_IDX_MIN, ARM_COMPUTE_ERROR, arm_compute::test::validation::axis, arm_compute::test::validation::dst, arm_compute::test::validation::dst_shape, arm_compute::test::validation::output_data_type, arm_compute::test::validation::src, and arm_compute::U32.

◆ concatenate_layer() [1/4]

SimpleTensor< T > concatenate_layer ( std::vector< SimpleTensor< T >> &  srcs,
SimpleTensor< T > &  dst,
unsigned int  axis 
)

Definition at line 104 of file ConcatenateLayer.cpp.

105 {
106  switch(axis)
107  {
108  case Window::DimX:
109  {
110  return widthconcatenate_layer(srcs, dst);
111  }
112  case Window::DimY:
113  {
114  for(auto &t : srcs)
115  {
116  t = reference::permute<T>(t, PermutationVector(1U, 0U));
117  }
118  dst = reference::permute<T>(dst, PermutationVector(1U, 0U));
119  return reference::permute<T>(widthconcatenate_layer(srcs, dst), PermutationVector(1U, 0U));
120  }
121  case Window::DimZ:
122  {
123  for(auto &t : srcs)
124  {
125  t = reference::permute<T>(t, PermutationVector(2U, 1U, 0U));
126  }
127  dst = reference::permute<T>(dst, PermutationVector(2U, 1U, 0U));
128  return reference::permute<T>(widthconcatenate_layer(srcs, dst), PermutationVector(2U, 1U, 0U));
129  }
130  case 3:
131  {
132  for(auto &t : srcs)
133  {
134  t = reference::permute<T>(t, PermutationVector(3U, 2U, 1U, 0U));
135  }
136  dst = reference::permute<T>(dst, PermutationVector(3U, 2U, 1U, 0U));
137  auto ret = reference::permute<T>(widthconcatenate_layer(srcs, dst), PermutationVector(3U, 2U, 1U, 0U));
138  return ret;
139  }
140  default:
141  {
142  ARM_COMPUTE_ERROR("Not supported");
143  return dst;
144  }
145  }
146 }
#define ARM_COMPUTE_ERROR(...)
Print the given message then throw an std::runtime_error.
Definition: Error.h:261
Strides PermutationVector
Permutation vector.
Definition: Types.h:47

References ARM_COMPUTE_ERROR, arm_compute::test::validation::axis, Window::DimX, Window::DimY, Window::DimZ, and arm_compute::test::validation::dst.

◆ concatenate_layer() [2/4]

template SimpleTensor<float> arm_compute::test::validation::reference::concatenate_layer ( std::vector< SimpleTensor< float >> &  srcs,
SimpleTensor< float > &  dst,
unsigned int  axis 
)

◆ concatenate_layer() [3/4]

template SimpleTensor<half> arm_compute::test::validation::reference::concatenate_layer ( std::vector< SimpleTensor< half >> &  srcs,
SimpleTensor< half > &  dst,
unsigned int  axis 
)

◆ concatenate_layer() [4/4]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::concatenate_layer ( std::vector< SimpleTensor< uint8_t >> &  srcs,
SimpleTensor< uint8_t > &  dst,
unsigned int  axis 
)

◆ conv2d_dft() [1/2]

SimpleTensor< T > conv2d_dft ( const SimpleTensor< T > &  src,
const SimpleTensor< T > &  w,
const PadStrideInfo conv_info 
)

Performs and DFT based convolution on a real input.

Parameters
[in]srcSource tensor.
[in]wWeights tensor.
[in]conv_infoConvolution related metadata.
Returns
The output tensor.

Definition at line 374 of file DFT.cpp.

375 {
376  // Pad input to full padding
377  const PaddingList padding_in = { { 0, w.shape()[0] - 1 }, { 0, w.shape()[1] - 1 } };
378  auto padded_src = pad_layer(src, padding_in);
379 
380  // Flip weights
381  std::vector<uint32_t> axis_v = { 0, 1 };
382  SimpleTensor<uint32_t> axis{ TensorShape(2U), DataType::U32 };
383  std::copy(axis_v.begin(), axis_v.begin() + axis.shape().x(), axis.data());
384  auto flipped_w = reverse(w, axis);
385 
386  // Pad weights to have the same size as input
387  const PaddingList paddings_w = { { 0, src.shape()[0] - 1 }, { 0, src.shape()[1] - 1 } };
388  auto padded_w = pad_layer(flipped_w, paddings_w);
389 
390  // Transform input and weights to frequency domain
391  auto Fsrc = rdft_2d(padded_src);
392  auto Fw = rdft_2d(padded_w);
393 
394  // Perform dot product
395  auto Fdst = complex_mul_and_reduce(Fsrc, Fw);
396 
397  // Transform output back to frequency domain
398  auto conv_res = ridft_2d(Fdst);
399 
400  // Slice output
401  const int start_left = w.shape().x() - conv_info.pad_left() - 1;
402  const int start_top = w.shape().y() - conv_info.pad_top() - 1;
403  const int end_right = conv_res.shape().x() - (w.shape().x() - conv_info.pad_right() - 1);
404  const int end_botton = conv_res.shape().y() - (w.shape().y() - conv_info.pad_bottom() - 1);
405  return slice(conv_res, Coordinates(start_left, start_top), Coordinates(end_right, end_botton));
406 }
SimpleTensor< T > pad_layer(const SimpleTensor< T > &src, const PaddingList &paddings, const PixelValue const_value, const PaddingMode mode)
Reference function to pad an ND tensor.
Definition: PadLayer.cpp:39
SimpleTensor< T > reverse(const SimpleTensor< T > &src, const SimpleTensor< uint32_t > &axis)
Definition: Reverse.cpp:38
SimpleTensor< float > w
Definition: DFT.cpp:156
std::vector< PaddingInfo > PaddingList
List of padding information.
Definition: Types.h:445
SimpleTensor< T > copy(const SimpleTensor< T > &src, const TensorShape &output_shape)
Definition: Copy.cpp:37
template SimpleTensor< float > ridft_2d(const SimpleTensor< float > &src, bool is_odd)
template SimpleTensor< float > rdft_2d(const SimpleTensor< float > &src)
cast configure & src
Definition: Cast.cpp:169
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)

References arm_compute::test::validation::axis, arm_compute::test::validation::conv_info, copy(), pad_layer(), rdft_2d(), reverse(), ridft_2d(), slice(), arm_compute::test::validation::src, arm_compute::U32, and arm_compute::test::validation::w.

◆ conv2d_dft() [2/2]

template SimpleTensor<float> arm_compute::test::validation::reference::conv2d_dft ( const SimpleTensor< float > &  src,
const SimpleTensor< float > &  w,
const PadStrideInfo conv_info 
)

◆ convert_fully_connected_weights() [1/4]

SimpleTensor< T > convert_fully_connected_weights ( const SimpleTensor< T > &  src,
const TensorShape original_input_shape,
const DataLayout  training_data_layout 
)

Definition at line 35 of file ConvertFullyConnectedWeights.cpp.

36 {
37  SimpleTensor<T> dst(src.shape(), src.data_type());
38 
39  const DataLayout original_input_data_layout = (training_data_layout == DataLayout::NCHW) ? DataLayout::NHWC : DataLayout::NCHW;
40 
41  const int width_idx = get_data_layout_dimension_index(original_input_data_layout, DataLayoutDimension::WIDTH);
42  const int height_idx = get_data_layout_dimension_index(original_input_data_layout, DataLayoutDimension::HEIGHT);
43  const int channel_idx = get_data_layout_dimension_index(original_input_data_layout, DataLayoutDimension::CHANNEL);
44 
45  const bool is_nchw_to_nhwc = training_data_layout == DataLayout::NCHW;
46  const unsigned int num_elems_per_input_plane = original_input_shape[width_idx] * original_input_shape[height_idx];
47  const unsigned int num_channels = original_input_shape[channel_idx];
48  const unsigned int factor_1 = is_nchw_to_nhwc ? num_elems_per_input_plane : num_channels;
49  const unsigned int factor_2 = is_nchw_to_nhwc ? num_channels : num_elems_per_input_plane;
50 
51  for(int i = 0; i < src.num_elements(); ++i)
52  {
53  const Coordinates coords_in = index2coords(src.shape(), i);
54  const Coordinates coords_out(coords_in.x(), coords_in.y() % factor_1 * factor_2 + coords_in.y() / factor_1);
55 
56  dst[coords2index(dst.shape(), coords_out)] = src[i];
57  }
58 
59  return dst;
60 }
Coordinates index2coords(const TensorShape &shape, int index)
Convert a linear index into n-dimensional coordinates.
Definition: Helpers.inl:289
int coords2index(const TensorShape &shape, const Coordinates &coord)
Convert n-dimensional coordinates into a linear index.
Definition: Helpers.inl:308
size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)
Get the index of the given dimension.
Definition: Helpers.inl:326
DataLayout
[DataLayout enum definition]
Definition: Types.h:114
cast configure & src
Definition: Cast.cpp:169

References arm_compute::CHANNEL, arm_compute::coords2index(), arm_compute::test::validation::dst, arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, arm_compute::index2coords(), arm_compute::NCHW, arm_compute::NHWC, arm_compute::test::validation::src, arm_compute::WIDTH, Dimensions< T >::x(), and Dimensions< T >::y().

◆ convert_fully_connected_weights() [2/4]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::convert_fully_connected_weights ( const SimpleTensor< uint8_t > &  src,
const TensorShape original_input_shape,
const DataLayout  training_data_layout 
)

◆ convert_fully_connected_weights() [3/4]

template SimpleTensor<half> arm_compute::test::validation::reference::convert_fully_connected_weights ( const SimpleTensor< half > &  src,
const TensorShape original_input_shape,
const DataLayout  training_data_layout 
)

◆ convert_fully_connected_weights() [4/4]

template SimpleTensor<float> arm_compute::test::validation::reference::convert_fully_connected_weights ( const SimpleTensor< float > &  src,
const TensorShape original_input_shape,
const DataLayout  training_data_layout 
)

◆ convolution()

SimpleTensor< T > convolution ( const SimpleTensor< uint8_t > &  src,
DataType  output_data_type,
const int16_t *  conv,
uint32_t  scale,
BorderMode  border_mode,
uint8_t  constant_border_value,
const unsigned int  width,
const unsigned int  height 
)

Definition at line 38 of file Convolution.cpp.

41 {
43  ARM_COMPUTE_ERROR_ON(scale >= std::numeric_limits<int32_t>::max());
44 
45  SimpleTensor<T> dst(src.shape(), output_data_type);
46  SimpleTensor<int32_t> sum(src.shape(), output_data_type);
47 
48  for(int element_idx = 0; element_idx < src.num_elements(); ++element_idx)
49  {
50  const Coordinates id = index2coord(src.shape(), element_idx);
51  apply_2d_spatial_filter(id, src, sum, TensorShape(width, height), conv, 1, border_mode, constant_border_value);
52  dst[element_idx] = saturate_cast<T>(tensor_elem_at<int32_t>(sum, id, border_mode, constant_border_value) / static_cast<int>(scale));
53  }
54 
55  return dst;
56 }
void apply_2d_spatial_filter(Coordinates coord, const SimpleTensor< T > &src, SimpleTensor< U > &dst, const TensorShape &filter_shape, const V *filter_itr, double scale, BorderMode border_mode, T constant_border_value=T(0))
Definition: Utils.h:98
DATA_TYPE sum(__global const DATA_TYPE *input)
Calculate sum of a vector.
std::vector< int16_t > conv(filter_height *filter_width)
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:337
convolution configure & src(), 0, border_mode
Coordinates index2coord(const TensorShape &shape, int index)
Convert a linear index into n-dimensional coordinates.
Definition: Utils.h:451

References arm_compute::test::validation::apply_2d_spatial_filter(), ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::border_mode, arm_compute::test::validation::conv, arm_compute::test::validation::dst, arm_compute::test::index2coord(), arm_compute::test::validation::output_data_type, scale(), arm_compute::test::validation::src, and sum().

◆ convolution_layer() [1/4]

SimpleTensor< T > convolution_layer ( const SimpleTensor< T > &  src,
const SimpleTensor< T > &  weights,
const SimpleTensor< TB > &  bias,
const TensorShape output_shape,
const PadStrideInfo info,
const Size2D dilation,
unsigned int  num_groups,
QuantizationInfo  out_quant_info 
)

Definition at line 113 of file ConvolutionLayer.cpp.

115 {
116  // if no explicit quantization has been set you the same as src
117  if(out_quant_info == QuantizationInfo())
118  {
119  out_quant_info = src.quantization_info();
120  }
121  // Create reference
122  SimpleTensor<T> dst{ output_shape, src.data_type(), 1, out_quant_info };
123 
124  if(src.data_layout() == DataLayout::NHWC)
125  {
126  SimpleTensor<T> src_nchw = reference::permute<T>(src, PermutationVector(1U, 2U, 0U));
127  SimpleTensor<T> weights_nchw = reference::permute<T>(weights, PermutationVector(1U, 2U, 0U));
128  SimpleTensor<T> dst_nchw = reference::permute<T>(dst, PermutationVector(1U, 2U, 0U));
129 
130  return reference::permute<T>(convolution_layer_nchw(src_nchw, weights_nchw, bias, dst_nchw, info, dilation, num_groups), PermutationVector(2U, 0U, 1U));
131  }
132  else
133  {
135  }
136 }
Strides PermutationVector
Permutation vector.
Definition: Types.h:47
SimpleTensor< T > convolution_layer_nchw(const SimpleTensor< T > &src, const SimpleTensor< T > &weights, const SimpleTensor< TB > &bias, SimpleTensor< T > &dst, const PadStrideInfo &info, const Size2D &dilation, unsigned int num_groups)
const unsigned int num_groups
Definition: Im2Col.cpp:148
cast configure & src
Definition: Cast.cpp:169

References arm_compute::test::validation::bias, convolution_layer_nchw(), arm_compute::test::validation::dilation, arm_compute::test::validation::dst, arm_compute::test::validation::info, arm_compute::NHWC, arm_compute::test::validation::num_groups, arm_compute::test::validation::output_shape, arm_compute::test::validation::src, and arm_compute::test::validation::weights.

Referenced by deconvolution_layer(), and depthwise_separable_convolution_layer().

◆ convolution_layer() [2/4]

template SimpleTensor<float> arm_compute::test::validation::reference::convolution_layer ( const SimpleTensor< float > &  src,
const SimpleTensor< float > &  weights,
const SimpleTensor< float > &  bias,
const TensorShape output_shape,
const PadStrideInfo info,
const Size2D dilation,
unsigned int  num_groups,
QuantizationInfo  out_quant_info 
)

◆ convolution_layer() [3/4]

template SimpleTensor<half> arm_compute::test::validation::reference::convolution_layer ( const SimpleTensor< half > &  src,
const SimpleTensor< half > &  weights,
const SimpleTensor< half > &  bias,
const TensorShape output_shape,
const PadStrideInfo info,
const Size2D dilation,
unsigned int  num_groups,
QuantizationInfo  out_quant_info 
)

◆ convolution_layer() [4/4]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::convolution_layer ( const SimpleTensor< uint8_t > &  src,
const SimpleTensor< uint8_t > &  weights,
const SimpleTensor< int32_t > &  bias,
const TensorShape output_shape,
const PadStrideInfo info,
const Size2D dilation,
unsigned int  num_groups,
QuantizationInfo  out_quant_info 
)

◆ convolution_layer_nchw()

SimpleTensor<T> arm_compute::test::validation::reference::convolution_layer_nchw ( const SimpleTensor< T > &  src,
const SimpleTensor< T > &  weights,
const SimpleTensor< TB > &  bias,
SimpleTensor< T > &  dst,
const PadStrideInfo info,
const Size2D dilation,
unsigned int  num_groups 
)

Definition at line 49 of file ConvolutionLayer.cpp.

51 {
52  ARM_COMPUTE_ERROR_ON((src.shape()[2] / num_groups) != weights.shape()[2]);
53 
54  // Compute reference
55  const int width_in = src.shape().x();
56  const int height_in = src.shape().y();
57  const int depth_in = src.shape().z();
58  const int width_out = dst.shape().x();
59  const int height_out = dst.shape().y();
60  const int depth_out = dst.shape().z();
61  const int width_weights = weights.shape().x();
62  const int height_weights = weights.shape().y();
63  const int depth_weights = weights.shape().z();
64  const int pad_left = info.pad_left();
65  const int pad_top = info.pad_top();
66  const int stride_xi = info.stride().first;
67  const int stride_yi = info.stride().second;
68 
69  auto output_wh = scaled_dimensions(width_in, height_in, width_weights, height_weights, info, dilation);
70 
71  const int start_xi = (dilation.x() * (width_weights - 1) + 1) / 2 - pad_left;
72  const int start_yi = (dilation.y() * (height_weights - 1) + 1) / 2 - pad_top;
73  const int end_xi = output_wh.first * stride_xi;
74  const int end_yi = output_wh.second * stride_yi;
75  const int num_batches = src.shape().total_size() / (width_in * height_in * depth_in);
76 
77  for(int r = 0; r < num_batches; ++r)
78  {
79  for(int yi = start_yi; yi < start_yi + end_yi; yi += stride_yi)
80  {
81  for(int xi = start_xi; xi < start_xi + end_xi; xi += stride_xi)
82  {
83  for(int group = 0; group < static_cast<int>(num_groups); ++group)
84  {
85  for(int ofm = 0; ofm < static_cast<int>(depth_out / num_groups); ++ofm)
86  {
87  // Compute input and output offsets
88  const int offset_in = r * width_in * height_in * depth_in + (group * (depth_in / num_groups) * width_in * height_in);
89  const int xo = (xi - start_xi) / stride_xi;
90  const int yo = (yi - start_yi) / stride_yi;
91  const int offset_out = xo + yo * width_out + ((ofm + group * (depth_out / num_groups)) * width_out * height_out) + (r * width_out * height_out * depth_out);
92  const int offset_w = (ofm + group * (depth_out / num_groups)) * width_weights * height_weights * depth_weights;
93  const int offset_b = (ofm + group * (depth_out / num_groups));
94 
95  ARM_COMPUTE_ASSERT(xo < width_out);
96  ARM_COMPUTE_ASSERT(yo < height_out);
97 
98  // Compute 3D convolution
100  offset_in, offset_w, offset_b, offset_out,
101  xi, yi,
102  width_in, height_in, (depth_in / num_groups),
103  width_weights, height_weights, dilation.x(), dilation.y());
104  }
105  }
106  }
107  }
108  }
109 
110  return dst;
111 }
std::pair< unsigned int, unsigned int > scaled_dimensions(unsigned int width, unsigned int height, unsigned int kernel_width, unsigned int kernel_height, const PadStrideInfo &pad_stride_info, const Size2D &dilation=Size2D(1U, 1U))
Returns expected width and height of output scaled tensor depending on dimensions rounding mode.
Definition: Utils.cpp:387
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:337
const unsigned int num_groups
Definition: Im2Col.cpp:148
#define ARM_COMPUTE_ASSERT(X)
Definition: Asserts.h:110
void convolution3d(const SimpleTensor< T > &in, const SimpleTensor< T > &weights, const SimpleTensor< TB > &bias, SimpleTensor< T > &out, int i_offset, int w_offset, int b_offset, int o_offset, int xi, int yi, int width_in, int height_in, int depth_in, int width_weights, int height_weights, int dilation_x=1, int dilation_y=1)
Definition: Convolution3d.h:46
cast configure & src
Definition: Cast.cpp:169

References ARM_COMPUTE_ASSERT, ARM_COMPUTE_ERROR_ON, arm_compute::test::validation::bias, arm_compute::test::convolution_3d::detail::convolution3d(), arm_compute::test::validation::dilation, arm_compute::test::validation::dst, arm_compute::test::validation::info, arm_compute::test::validation::num_groups, arm_compute::test::validation::output_wh, arm_compute::scaled_dimensions(), arm_compute::test::validation::src, and arm_compute::test::validation::weights.

Referenced by convolution_layer().

◆ copy() [1/9]

◆ copy() [2/9]

template SimpleTensor<uint8_t> arm_compute::test::validation::reference::copy ( const SimpleTensor< uint8_t > &  src,
const TensorShape output_shape 
)

◆ copy() [3/9]

template SimpleTensor<int8_t> arm_compute::test::validation::reference::copy ( const SimpleTensor< int8_t > &  src,
const TensorShape output_shape 
)

◆ copy() [4/9]

template SimpleTensor<uint16_t> arm_compute::test::validation::reference::copy ( const SimpleTensor< uint16_t > &  src,
const TensorShape output_shape 
)

◆ copy() [5/9]

template SimpleTensor<int16_t> arm_compute::test::validation::reference::copy ( const SimpleTensor< int16_t > &  src,
const TensorShape output_shape 
)

◆ copy() [6/9]

template SimpleTensor<uint32_t> arm_compute::test::validation::reference::copy ( const SimpleTensor< uint32_t > &  src,
const TensorShape output_shape 
)

◆ copy() [7/9]

template SimpleTensor<int32_t> arm_compute::test::validation::reference::copy ( const SimpleTensor< int32_t > &  src,
const TensorShape output_shape 
)

◆ copy() [8/9]

template SimpleTensor<half> arm_compute::test::validation::reference::copy ( const SimpleTensor< half > &  src,
const TensorShape output_shape 
)

◆ copy() [9/9]

template