24 #ifndef EXAMPLES_GEMMTUNERHELPERS_H
25 #define EXAMPLES_GEMMTUNERHELPERS_H
32 namespace gemm_tuner_helpers
36 constexpr
unsigned int num_floats_per_pixel = 4;
38 const unsigned int stride_y_in_elements =
tensor->strides_in_bytes()[1] /
tensor->element_size();
39 const unsigned int pixel_aligment =
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;