35 for (
size_t byte = 0;
byte < num;
byte++)
55 size_t num_bytes_per_element,
size_t num_elements_per_line,
56 size_t dst_total_line_length,
size_t num_lines,
size_t total_lines,
59 unsigned int left_trim_bytes = x_offset * num_bytes_per_element;
60 unsigned int right_trim_bytes = (dst_total_line_length - num_elements_per_line) * num_bytes_per_element;
62 for (
size_t plane = 0; plane < num_planes; plane++) {
63 for (
size_t line = 0; line < total_lines; line++) {
64 if ((line < y_offset) || (line >= num_lines)) {
70 TTL_local_memset(dst_ptr + (num_elements_per_line * num_bytes_per_element), 0, right_trim_bytes);
72 dst_ptr += dst_total_line_length * num_bytes_per_element;
112 *src_address = (
__global char *)const_external_tensor.
base + (x_offset * const_external_tensor.
elem_size) +
TTL_const_ext_void_tensor_t TTL_const_ext_tensor_t
static TTL_shape_t TTL_import_pre_fill(const TTL_int_sub_tensor_t internal_sub_tensor, const TTL_const_ext_tensor_t const_external_tensor, __local void **const dst_address, __global void **const src_address)
static void TTL_clear_void_space(__local void *const dst, const size_t x_offset, const size_t y_offset, size_t num_bytes_per_element, size_t num_elements_per_line, size_t dst_total_line_length, size_t num_lines, size_t total_lines, size_t num_planes)
Clear any unpopulated space in the target area.
static __local void * TTL_local_memset(__local void *const ptr, char value, size_t num)
Fill block of local memory.
TTL_int_void_sub_tensor_t TTL_int_sub_tensor_t
#define __global
The opencl __global namespace is not supported in C.
#define __local
The opencl __local namespace is not supported in C.
__global const void * base
TTL_int_void_tensor_t tensor
struct TTL_int_void_sub_tensor_t::@266046156211021141270372070244026262143005251323 origin
TTL_dim_t row_spacing
The distance between the start of consequtive rows in units of elements.
TTL_dim_t plane_spacing
The distance between the start of consequtive planes in units of elements.
TTL_offset_dim_t y
Offset in dimension y.
TTL_offset_dim_t x
Offset in dimension x.
TTL_dim_t depth
Number of planes along dimension z.
TTL_dim_t width
Number of elements along dimension x.
TTL_dim_t height
Number of rows along dimension y.
static TTL_shape_t TTL_create_shape(TTL_dim_t width, TTL_dim_t height, TTL_dim_t depth)
Create a description of a Shape.