Compute Library
18.05
|
#include "helpers.h"
Go to the source code of this file.
Macros | |
#define | CONVERT_OP_FLOAT_STR(x, type, round) (convert_##type##round(x)) |
#define | CONVERT_OP_FLOAT(x, type, round) CONVERT_OP_FLOAT_STR(x, type, round) |
Functions | |
__kernel void | pixelwise_mul_float (__global uchar *in1_ptr, uint in1_stride_x, uint in1_step_x, uint in1_stride_y, uint in1_step_y, uint in1_stride_z, uint in1_step_z, uint in1_offset_first_element_in_bytes, __global uchar *in2_ptr, uint in2_stride_x, uint in2_step_x, uint in2_stride_y, uint in2_step_y, uint in2_stride_z, uint in2_step_z, uint in2_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_stride_z, uint out_step_z, uint out_offset_first_element_in_bytes, const float scale) |
Performs a pixelwise multiplication with float scale of either integer or float inputs. More... | |
#define CONVERT_OP_FLOAT | ( | x, | |
type, | |||
round | |||
) | CONVERT_OP_FLOAT_STR(x, type, round) |
Definition at line 31 of file pixelwise_mul_float.cl.
Referenced by pixelwise_mul_float().
#define CONVERT_OP_FLOAT_STR | ( | x, | |
type, | |||
round | |||
) | (convert_##type##round(x)) |
Definition at line 29 of file pixelwise_mul_float.cl.
__kernel void pixelwise_mul_float | ( | __global uchar * | in1_ptr, |
uint | in1_stride_x, | ||
uint | in1_step_x, | ||
uint | in1_stride_y, | ||
uint | in1_step_y, | ||
uint | in1_stride_z, | ||
uint | in1_step_z, | ||
uint | in1_offset_first_element_in_bytes, | ||
__global uchar * | in2_ptr, | ||
uint | in2_stride_x, | ||
uint | in2_step_x, | ||
uint | in2_stride_y, | ||
uint | in2_step_y, | ||
uint | in2_stride_z, | ||
uint | in2_step_z, | ||
uint | in2_offset_first_element_in_bytes, | ||
__global uchar * | out_ptr, | ||
uint | out_stride_x, | ||
uint | out_step_x, | ||
uint | out_stride_y, | ||
uint | out_step_y, | ||
uint | out_stride_z, | ||
uint | out_step_z, | ||
uint | out_offset_first_element_in_bytes, | ||
const float | scale | ||
) |
Performs a pixelwise multiplication with float scale of either integer or float inputs.
[in] | in1_ptr | Pointer to the source image. Supported data types: U8, S16, F16, F32 |
[in] | in1_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | in1_step_x | in1_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | in1_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | in1_step_y | in1_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | in1_stride_z | Stride of the source image in Y dimension (in bytes) |
[in] | in1_step_z | in1_stride_z * number of elements along Y processed per workitem(in bytes) |
[in] | in1_offset_first_element_in_bytes | The offset of the first element in the source image |
[in] | in2_ptr | Pointer to the source image. Supported data types: U8, S16, F16, F32 |
[in] | in2_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | in2_step_x | in2_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | in2_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | in2_step_y | in2_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | in2_stride_z | Stride of the source image in Y dimension (in bytes) |
[in] | in2_step_z | in2_stride_z * number of elements along Y processed per workitem(in bytes) |
[in] | in2_offset_first_element_in_bytes | The offset of the first element in the source image |
[out] | out_ptr | Pointer to the destination image. Supported data types: U8, S16, F16, F32 |
[in] | out_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | out_step_x | out_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | out_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | out_step_y | out_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | out_stride_z | Stride of the destination image in Y dimension (in bytes) |
[in] | out_step_z | out_stride_z * number of elements along Y processed per workitem(in bytes) |
[in] | out_offset_first_element_in_bytes | The offset of the first element in the destination image |
[in] | scale | Float scaling factor. Supported data types: F32 |
Definition at line 67 of file pixelwise_mul_float.cl.
References CONVERT, CONVERT_OP_FLOAT, CONVERT_TO_TENSOR3D_STRUCT, DATA_TYPE_OUT, Tensor3D::ptr, and VEC_DATA_TYPE.