24.02.1
|
Go to the documentation of this file.
58 ICPPKernel::configure(win);
67 if (
dst->total_size() != 0)
107 const size_t in_width =
src->info()->dimension(0);
108 const size_t element_size =
src->info()->element_size();
109 const size_t out_stride =
dst->info()->strides_in_bytes()[1];
116 const uint8_t *in_ptr = in.
ptr();
117 uint8_t *
const out_ptr =
123 if ((
id.x() + k) >= in_width)
125 std::memset(out_ptr + k * element_size, 0, element_size);
129 std::memcpy(out_ptr + k * element_size, in_ptr + k * element_size, element_size);
138 return "CpuGemmTranspose1xWKernel";
Class to describe a number of elements in each dimension.
SimpleTensor< float > src
constexpr size_t vector_size
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Interface for CPU tensor.
ITensor * get_tensor(int id)
Get tensor of a given id from the pac.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst)
Static function to check if given info will lead to a valid configuration of CpuGemmTranspose1xWKerne...
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
bool empty() const
Checks if pack is empty.
TensorShape compute_transpose1xW_with_element_size_shape(const ITensorInfo &b, int mult_transpose1xW_width=1)
Calculate the transposed 1xW width element shape.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
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...
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
void configure(const ITensorInfo *src, ITensorInfo *dst)
Configure kernel for a given list of arguments.
#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.
const Window & window() const
The maximum window the kernel can be executed on.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_QUANTIZATION_INFO(...)
Information about executing thread and CPU.
Describe a multidimensional execution window.
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
Copyright (c) 2017-2024 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
const char * name() const override
Name of the kernel.
@ UNKNOWN
Unknown data type.