Compute Library
18.05
|
#include "helpers.h"
Go to the source code of this file.
Macros | |
#define | MUL_OP(x, y) ((x) * (y)) |
#define | ADD_OP(x, y) ((x) + (y)) |
#define | DIV_OP(x, y) ((x) / (y)) |
#define | POW_OP(x, y) pow((x), (y)) |
#define | SQCVT_SAT(a) (a) |
#define | LOAD_OP(offset, ptr) vload4(offset, ptr) |
#define | STORE_OP(data, offset, ptr) vstore4(data, offset, ptr) |
Functions | |
__kernel void | normalization_layer_cross_map (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_stride_z, uint input_step_z, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_stride_z, uint output_step_z, uint output_offset_first_element_in_bytes) |
Apply cross-map normalization. More... | |
__kernel void | normalization_layer_in_map (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_stride_z, uint input_step_z, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_stride_z, uint output_step_z, uint output_offset_first_element_in_bytes) |
Apply in-map normalization. More... | |
#define ADD_OP | ( | x, | |
y | |||
) | ((x) + (y)) |
Definition at line 43 of file normalization_layer.cl.
Referenced by normalization_layer_cross_map(), and normalization_layer_in_map().
#define DIV_OP | ( | x, | |
y | |||
) | ((x) / (y)) |
Definition at line 44 of file normalization_layer.cl.
Referenced by normalization_layer_cross_map(), and normalization_layer_in_map().
Definition at line 48 of file normalization_layer.cl.
Referenced by normalization_layer_cross_map(), and normalization_layer_in_map().
#define MUL_OP | ( | x, | |
y | |||
) | ((x) * (y)) |
Definition at line 42 of file normalization_layer.cl.
Referenced by normalization_layer_cross_map(), and normalization_layer_in_map().
#define POW_OP | ( | x, | |
y | |||
) | pow((x), (y)) |
Definition at line 45 of file normalization_layer.cl.
Referenced by normalization_layer_cross_map(), and normalization_layer_in_map().
#define SQCVT_SAT | ( | a | ) | (a) |
Definition at line 46 of file normalization_layer.cl.
Referenced by normalization_layer_cross_map(), and normalization_layer_in_map().
Definition at line 49 of file normalization_layer.cl.
Referenced by normalization_layer_cross_map(), and normalization_layer_in_map().
__kernel void normalization_layer_cross_map | ( | __global uchar * | input_ptr, |
uint | input_stride_x, | ||
uint | input_step_x, | ||
uint | input_stride_y, | ||
uint | input_step_y, | ||
uint | input_stride_z, | ||
uint | input_step_z, | ||
uint | input_offset_first_element_in_bytes, | ||
__global uchar * | output_ptr, | ||
uint | output_stride_x, | ||
uint | output_step_x, | ||
uint | output_stride_y, | ||
uint | output_step_y, | ||
uint | output_stride_z, | ||
uint | output_step_z, | ||
uint | output_offset_first_element_in_bytes | ||
) |
Apply cross-map normalization.
[in] | input_ptr | Pointer to the first source tensor. Supported data types: QS8/QS16/F16/F32 |
[in] | input_stride_x | Stride of the first source tensor in X dimension (in bytes) |
[in] | input_step_x | input_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | input_stride_y | Stride of the first source tensor in Y dimension (in bytes) |
[in] | input_step_y | input_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | input_stride_z | Stride of the first source tensor in Z dimension (in bytes) |
[in] | input_step_z | input_stride_z * number of elements along Z processed per workitem(in bytes) |
[in] | input_offset_first_element_in_bytes | The offset of the first element in the first source tensor |
[out] | output_ptr | Pointer to the destination tensor. Supported data types: same as input_ptr |
[in] | output_stride_x | Stride of the destination tensor in X dimension (in bytes) |
[in] | output_step_x | output_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | output_stride_y | Stride of the destination tensor in Y dimension (in bytes) |
[in] | output_step_y | output_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | output_stride_z | Stride of the destination tensor in Z dimension (in bytes) |
[in] | output_step_z | output_stride_z * number of elements along Z processed per workitem(in bytes) |
[in] | output_offset_first_element_in_bytes | The offset of the first element in the destination tensor |
Definition at line 79 of file normalization_layer.cl.
References ADD_OP, CONVERT_TO_TENSOR3D_STRUCT, DATA_TYPE, DIV_OP, LOAD_OP, arm_compute::test::fixed_point_arithmetic::detail::max(), arm_compute::test::fixed_point_arithmetic::detail::min(), MUL_OP, POW_OP, Tensor3D::ptr, SQCVT_SAT, STORE_OP, tensor3D_offset(), and VEC_DATA_TYPE.
__kernel void normalization_layer_in_map | ( | __global uchar * | input_ptr, |
uint | input_stride_x, | ||
uint | input_step_x, | ||
uint | input_stride_y, | ||
uint | input_step_y, | ||
uint | input_stride_z, | ||
uint | input_step_z, | ||
uint | input_offset_first_element_in_bytes, | ||
__global uchar * | output_ptr, | ||
uint | output_stride_x, | ||
uint | output_step_x, | ||
uint | output_stride_y, | ||
uint | output_step_y, | ||
uint | output_stride_z, | ||
uint | output_step_z, | ||
uint | output_offset_first_element_in_bytes | ||
) |
Apply in-map normalization.
[in] | input_ptr | Pointer to the first source tensor. Supported data types: QS8/F16/F32 |
[in] | input_stride_x | Stride of the first source tensor in X dimension (in bytes) |
[in] | input_step_x | input_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | input_stride_y | Stride of the first source tensor in Y dimension (in bytes) |
[in] | input_step_y | input_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | input_stride_z | Stride of the first source tensor in Z dimension (in bytes) |
[in] | input_step_z | input_stride_z * number of elements along Z processed per workitem(in bytes) |
[in] | input_offset_first_element_in_bytes | The offset of the first element in the first source tensor |
[out] | output_ptr | Pointer to the destination tensor. Supported data types: same as input_ptr |
[in] | output_stride_x | Stride of the destination tensor in X dimension (in bytes) |
[in] | output_step_x | output_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | output_stride_y | Stride of the first destination tensor in Y dimension (in bytes) |
[in] | output_step_y | output_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | output_stride_z | Stride of the first source tensor in Z dimension (in bytes) |
[in] | output_step_z | output_stride_z * number of elements along Z processed per workitem(in bytes) |
[in] | output_offset_first_element_in_bytes | The offset of the first element in the destination tensor |
Definition at line 139 of file normalization_layer.cl.
References ADD_OP, CONVERT_TO_TENSOR3D_STRUCT, DATA_TYPE, DIV_OP, LOAD_OP, arm_compute::test::fixed_point_arithmetic::detail::max(), arm_compute::test::fixed_point_arithmetic::detail::min(), MUL_OP, POW_OP, Tensor3D::ptr, SQCVT_SAT, STORE_OP, tensor3D_offset(), and VEC_DATA_TYPE.