26 #define EQUAL(x, y) ((x) == (y)) 27 #define NOTEQUAL(x, y) ((x) != (y)) 28 #define GREATER(x, y) ((x) > (y)) 29 #define GREATEREQUAL(x, y) ((x) >= (y)) 30 #define LESS(x, y) ((x) < (y)) 31 #define LESSEQUAL(x, y) ((x) <= (y)) 33 #define DEFINE_KERNEL_STR(name) compare_##name 34 #define DEFINE_KERNEL(name) DEFINE_KERNEL_STR(name) 36 #define DEFINE_KERNEL_QUANTIZED_STR(name) compare_##name##_quantized 37 #define DEFINE_KERNEL_QUANTIZED(name) DEFINE_KERNEL_QUANTIZED_STR(name) 39 #if defined(DATA_TYPE) && defined(VEC_SIZE) && defined(OP) && defined(OP_NAME) 93 #if defined(OFFSET_IN1) && defined(OFFSET_IN2) && defined(SCALE_IN1) && defined(SCALE_IN2) 140 in_a = in_a - (int16)((
int)OFFSET_IN1);
141 in_b = in_b - (int16)((
int)OFFSET_IN2);
143 const float16 in1f32 = convert_float16(in_a) * (float16)((
float)SCALE_IN1);
144 const float16 in2f32 = convert_float16(in_b) * (float16)((
float)SCALE_IN2);
145 const int16 res = OP(in1f32, in2f32);
148 vstore16(convert_uchar16(res), 0, (__global uchar *)out.
ptr);
#define DEFINE_KERNEL_QUANTIZED(name)
Structure to hold 3D tensor information.
#define DEFINE_KERNEL(name)
#define CONVERT_TO_TENSOR3D_STRUCT(name)
__global uchar * ptr
Pointer to the starting postion of the buffer.
#define TENSOR3D_DECLARATION(name)
#define VEC_DATA_TYPE(type, size)