24.02.1
|
Go to the documentation of this file.
40 using namespace misc::shape_calculator;
53 if (
dst->total_size() != 0)
70 _convolved_dims = convolved_dims;
97 const uint8_t el_size =
src->info()->element_size();
98 const int output_stride_x =
dst->info()->strides_in_bytes().x();
99 const int output_stride_y =
dst->info()->strides_in_bytes().y();
100 const int output_stride_z =
dst->info()->strides_in_bytes().z();
102 Window window_out(window);
115 const int hidx =
id.
y();
116 const int idx =
id.x() * output_stride_z + (hidx / _convolved_dims.width) * output_stride_y +
117 (hidx % _convolved_dims.width) * output_stride_x;
118 std::memcpy(out.
ptr() + idx, in.
ptr(), el_size);
125 return "CpuCol2ImKernel";
Class to describe a number of elements in each dimension.
im2col_func configure(src_target.info(), dst_target.info(), spatial_kernel, conv_info, has_bias)
SimpleTensor< float > src
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Class for specifying the size of an image or rectangle.
ITensor * get_tensor(int id)
Get tensor of a given id from the pac.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
constexpr uint8_t * ptr() const
Return a pointer to the current pixel.
const ITensor * get_const_tensor(int id) const
Get constant tensor of a given id.
#define ARM_COMPUTE_ERROR_THROW_ON(status)
void execute_window_loop(const Window &w, L &&lambda_function, Ts &&...iterators)
Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...
Iterator updated by execute_window_loop for each window element.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())
Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...
constexpr const Dimension & y() const
Alias to access the second dimension of the window.
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Describe one of the image's dimensions with a start, end and step.
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_QUANTIZATION_INFO(...)
Information about executing thread and CPU.
Describe a multidimensional execution window.
Copyright (c) 2017-2024 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(...)
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Status validate(const ITensorInfo *scores_in, const ITensorInfo *boxes_in, const ITensorInfo *batch_splits_in, const ITensorInfo *scores_out, const ITensorInfo *boxes_out, const ITensorInfo *classes, const ITensorInfo *batch_splits_out, const ITensorInfo *keeps, const ITensorInfo *keeps_size, const BoxNMSLimitInfo info)
Store the tensor's metadata.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
@ UNKNOWN
Unknown data type.
TensorShape compute_col2im_shape(const ITensorInfo &input, const Size2D &convolved_dims, bool batch_size_on_z, unsigned int num_groups=1)
Calculate the Col2Im shape.