24.02.1
|
Go to the documentation of this file.
44 _constant_value = constant_value;
48 ICpuKernel::configure(win);
60 bool has_collapsed =
true;
64 uint8_t *
const start_valid_region = inout->ptr_to_element(inout->info()->valid_region().anchor);
65 const auto window_width =
static_cast<int>(collapsed.
x().
end()) -
static_cast<int>(collapsed.
x().
start());
66 const size_t element_size = inout->info()->element_size();
71 Iterator tensor_it(inout, collapsed);
76 uint8_t *base_addr = start_valid_region + tensor_it.
offset();
78 for (
int i = 0; i < window_width; ++i)
80 std::memcpy(base_addr + i * element_size, &_constant_value.
value, element_size);
88 return "CpuFillKernel";
Class to describe a number of elements in each dimension.
constexpr int start() const
Return the start of the dimension.
void run_op(ITensorPack &tensors, const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
Class describing the value of a pixel for any image format.
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
const char * name() const override
Name of the kernel.
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Window collapse_if_possible(const Window &full_window, size_t first, size_t last, bool *has_collapsed=nullptr) const
Collapse the dimensions between first and last if possible.
ITensor * get_tensor(int id)
Get tensor of a given id from the pac.
#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.
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_ERROR_ON_INVALID_SUBWINDOW(f, s)
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
CLTensor * tensor
Pointer to the auxiliary tensor.
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.
const Window & window() const
The maximum window the kernel can be executed on.
Information about executing thread and CPU.
Describe a multidimensional execution window.
constexpr size_t offset() const
Return the offset in bytes from the first element to the current position of the iterator.
Copyright (c) 2017-2024 Arm Limited.
void configure(const ITensorInfo *tensor, const PixelValue &constant_value)
Configure kernel for a given list of arguments.
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
union arm_compute::PixelValue::@0 value
Union which describes the value of a pixel for any image format.
Store the tensor's metadata.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
constexpr int end() const
Return the end of the dimension.
constexpr const Dimension & x() const
Alias to access the first dimension of the window.