ARM Compute Library
17.03.1
|
#include "helpers.h"
Go to the source code of this file.
Macros | |
#define | MAGNITUDE_OP(x, y) magnitude_l1((x), (y)) |
#define | PHASE_OP(x, y) phase_unsigned((x), (y)) |
Functions | |
DATA_TYPE16 | magnitude_l1 (DATA_TYPE16 a, DATA_TYPE16 b) |
Calculates L1 normalization between two inputs. More... | |
DATA_TYPE16 | magnitude_l2 (int16 a, int16 b) |
Calculates L2 normalization between two inputs. More... | |
uchar16 | phase_unsigned (DATA_TYPE16 a, DATA_TYPE16 b) |
Calculates unsigned phase between two inputs. More... | |
uchar16 | phase_signed (DATA_TYPE16 a, DATA_TYPE16 b) |
Calculates signed phase between two inputs. More... | |
__kernel void | magnitude_phase (__global uchar *gx_ptr, uint gx_stride_x, uint gx_step_x, uint gx_stride_y, uint gx_step_y, uint gx_offset_first_element_in_bytes, __global uchar *gy_ptr, uint gy_stride_x, uint gy_step_x, uint gy_stride_y, uint gy_step_y, uint gy_offset_first_element_in_bytes, __global uchar *magnitude_ptr, uint magnitude_stride_x, uint magnitude_step_x, uint magnitude_stride_y, uint magnitude_step_y, uint magnitude_offset_first_element_in_bytes, __global uchar *phase_ptr, uint phase_stride_x, uint phase_step_x, uint phase_stride_y, uint phase_step_y, uint phase_offset_first_element_in_bytes) |
Calculate the magnitude and phase of given the gradients of an image. More... | |
#define MAGNITUDE_OP | ( | x, | |
y | |||
) | magnitude_l1((x), (y)) |
Definition at line 82 of file magnitude_phase.cl.
Referenced by magnitude_phase().
#define PHASE_OP | ( | x, | |
y | |||
) | phase_unsigned((x), (y)) |
Definition at line 90 of file magnitude_phase.cl.
Referenced by magnitude_phase().
|
inline |
Calculates L1 normalization between two inputs.
[in] | a | First input. Supported data types: S16, S32 |
[in] | b | Second input. Supported data types: S16, S32 |
Definition at line 33 of file magnitude_phase.cl.
References CONVERT_SAT, and VEC_DATA_TYPE.
|
inline |
Calculates L2 normalization between two inputs.
[in] | a | First input. Supported data types: S16, S32 |
[in] | b | Second input. Supported data types: S16, S32 |
Definition at line 45 of file magnitude_phase.cl.
References CONVERT_SAT, DATA_TYPE, and VEC_DATA_TYPE.
__kernel void magnitude_phase | ( | __global uchar * | gx_ptr, |
uint | gx_stride_x, | ||
uint | gx_step_x, | ||
uint | gx_stride_y, | ||
uint | gx_step_y, | ||
uint | gx_offset_first_element_in_bytes, | ||
__global uchar * | gy_ptr, | ||
uint | gy_stride_x, | ||
uint | gy_step_x, | ||
uint | gy_stride_y, | ||
uint | gy_step_y, | ||
uint | gy_offset_first_element_in_bytes, | ||
__global uchar * | magnitude_ptr, | ||
uint | magnitude_stride_x, | ||
uint | magnitude_step_x, | ||
uint | magnitude_stride_y, | ||
uint | magnitude_step_y, | ||
uint | magnitude_offset_first_element_in_bytes, | ||
__global uchar * | phase_ptr, | ||
uint | phase_stride_x, | ||
uint | phase_step_x, | ||
uint | phase_stride_y, | ||
uint | phase_step_y, | ||
uint | phase_offset_first_element_in_bytes | ||
) |
Calculate the magnitude and phase of given the gradients of an image.
[in] | gx_ptr | Pointer to the first source image (gradient X). Supported data types: S16, S32 |
[in] | gx_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | gx_step_x | gx_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | gx_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | gx_step_y | gx_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | gx_offset_first_element_in_bytes | The offset of the first element in the source image |
[in] | gy_ptr | Pointer to the second source image (gradient Y) . Supported data types: S16, S32 |
[in] | gy_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | gy_step_x | gy_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | gy_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | gy_step_y | gy_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | gy_offset_first_element_in_bytes | The offset of the first element in the destination image |
[out] | magnitude_ptr | Pointer to the magnitude destination image. Supported data types: S16, S32 |
[in] | magnitude_stride_x | Stride of the source image in X dimension (in bytes) |
[in] | magnitude_step_x | magnitude_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | magnitude_stride_y | Stride of the source image in Y dimension (in bytes) |
[in] | magnitude_step_y | magnitude_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | magnitude_offset_first_element_in_bytes | The offset of the first element in the source image |
[out] | phase_ptr | Pointer to the phase destination image. Supported data types: U8 |
[in] | phase_stride_x | Stride of the destination image in X dimension (in bytes) |
[in] | phase_step_x | phase_stride_x * number of elements along X processed per workitem(in bytes) |
[in] | phase_stride_y | Stride of the destination image in Y dimension (in bytes) |
[in] | phase_step_y | phase_stride_y * number of elements along Y processed per workitem(in bytes) |
[in] | phase_offset_first_element_in_bytes | The offset of the first element in the destination image |
Definition at line 131 of file magnitude_phase.cl.
References CONVERT_TO_IMAGE_STRUCT, DATA_TYPE, MAGNITUDE_OP, PHASE_OP, Image::ptr, and VEC_DATA_TYPE.
|
inline |
Calculates signed phase between two inputs.
[in] | a | First input. Supported data types: S16, S32 |
[in] | b | Second input. Supported data types: S16, S32 |
Definition at line 73 of file magnitude_phase.cl.
|
inline |
Calculates unsigned phase between two inputs.
[in] | a | First input. Supported data types: S16, S32 |
[in] | b | Second input. Supported data types: S16, S32 |
Definition at line 58 of file magnitude_phase.cl.