24 #ifndef EXAMPLES_GEMMTUNERHELPERS_H 25 #define EXAMPLES_GEMMTUNERHELPERS_H 32 namespace gemm_tuner_helpers
36 constexpr
unsigned int num_floats_per_pixel = 4;
41 if(pixel_aligment == 0)
45 const unsigned int row_pitch_alignment = pixel_aligment * num_floats_per_pixel;
46 const unsigned int round_up_width =
47 ((stride_y_in_elements + row_pitch_alignment - 1) / row_pitch_alignment) * row_pitch_alignment;
48 const unsigned int padding = round_up_width - stride_y_in_elements;
bool update_padding_for_cl_image(arm_compute::ITensorInfo *tensor)
Container for 2D border size.
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
Store the tensor's metadata.
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context...
virtual size_t element_size() const =0
Element size in bytes calculated as data_size() * num_channels()
size_t get_cl_image_pitch_alignment(const cl::Device &device)
Helper function to get the cl_image pitch alignment in pixels.
virtual const Strides & strides_in_bytes() const =0
The strides in bytes for accessing each dimension of the tensor.
virtual bool extend_padding(const PaddingSize &padding)=0
Update the offset to the first element, the strides and the total size.