27 #define CONVERT_OP_INT_STR(x, type, size) (convert_##type##size##_sat(x)) 29 #define CONVERT_OP_INT_STR(x, type, size) (convert_##type##size(x)) 31 #define CONVERT_OP_INT(x, type, size) CONVERT_OP_INT_STR(x, type, size) 33 #define MUL_OP(x, y, scale, type, size) CONVERT_OP_INT((x) * (y) >> scale, type, size) 35 #define CONVERT_RTE(x, type) (convert_##type##_rte((x))) 36 #define CONVERT_DOWN(x, type) CONVERT_RTE(x, type) 38 #if defined(DATA_TYPE_IN1) && defined(DATA_TYPE_IN2) && defined(ACC_DATA_TYPE) && defined(DATA_TYPE_OUT) 72 __kernel
void pixelwise_mul_int(
94 #if defined(SCALE_IN1) && defined(SCALE_IN2) && defined(SCALE_OUT) && defined(DATA_TYPE_OUT) && defined(VEC_SIZE) 96 #define VEC_FLOAT VEC_DATA_TYPE(float, VEC_SIZE) 97 #define VEC_INT VEC_DATA_TYPE(int, VEC_SIZE) 98 #define VEC_TYPE VEC_DATA_TYPE(DATA_TYPE_OUT, VEC_SIZE) 138 __kernel
void pixelwise_mul_quantized(
154 #if defined(OFFSET_IN1) 155 in_a -= (
VEC_INT)((
int)OFFSET_IN1);
156 #endif // defined(OFFSET_IN1) 157 #if defined(OFFSET_IN2) 158 in_b -= (
VEC_INT)((
int)OFFSET_IN2);
159 #endif // defined(OFFSET_IN2) 163 #if defined(OFFSET_OUT) 165 #else // defined(OFFSET_OUT) 167 #endif // defined(OFFSET_OUT)
#define CONVERT_SAT(a, b)
Structure to hold 3D tensor information.
#define CONVERT_DOWN(x, type)
#define CONVERT_TO_TENSOR3D_STRUCT(name)
#define MUL_OP(x, y, scale, type, size)
__global uchar * ptr
Pointer to the starting postion of the buffer.
#define TENSOR3D_DECLARATION(name)
#define VEC_DATA_TYPE(type, size)