CoreFlow 1.0.0
A modern orchestration and execution runtime
|
The helper is an non-standardized set of convenience constructs for OpenVX. More...
Classes | |
struct | _vx_param_description_t |
Contains everything needed to abstractly describe a parameter to a kernel. This is used to declare kernel parameters at compile time. More... | |
struct | _vx_kernel_description_t |
Contains everything needed to abstractly describe a kernel. This is used to declare kernels at compile time. More... | |
struct | _vx_log_entry_t |
A log entry contains the graph reference, a status and a message. More... | |
struct | _vx_log_t |
The log of a graph. More... | |
Macros | |
#define | VX_TAU 6.28318530717958647692 |
A definition for TAU, or 2*PI. | |
#define | VX_MAX_LOG_NUM_ENTRIES (1024) |
Maximum number of supported entries. | |
#define | dimof(x) |
A helper macro to determine the number of elements in an array. | |
Typedefs | |
typedef struct _vx_param_description_t | vx_param_description_t |
Contains everything needed to abstractly describe a parameter to a kernel. This is used to declare kernel parameters at compile time. | |
typedef struct _vx_kernel_description_t | vx_kernel_description_t |
Contains everything needed to abstractly describe a kernel. This is used to declare kernels at compile time. | |
typedef struct _vx_log_entry_t | vx_log_entry_t |
A log entry contains the graph reference, a status and a message. | |
typedef struct _vx_log_t | vx_log_t |
The log of a graph. | |
Functions | |
vx_status | vxGetLogEntry (vx_reference ref, char message[VX_MAX_LOG_MESSAGE_LEN]) |
Returns the previous entry of the log. When called consecutively it will return the entire log. The log will be cleared by reading it. | |
void | vxRegisterHelperAsLogReader (vx_context context) |
This enables the helper library logging feature to take over the error log callback and keep a database of previous log entries. | |
vx_node | vxCreateNodeByStructure (vx_graph graph, vx_enum kernelenum, vx_reference params[], vx_uint32 num) |
A method to construct a node via arbitrary parameters and an enum. | |
void | vxClearLog (vx_reference ref) |
A method to clear out the log for a particular reference, such as a graph. | |
vx_status | vxLinkParametersByReference (vx_parameter a, vx_parameter b) |
This is used to connect one node parameter to another node parameter when the original handles to the data objects are already lost. The context determines if a buffer is necessary or can be optimized out. | |
vx_status | vxLinkParametersByIndex (vx_node node_a, vx_uint32 index_a, vx_node node_b, vx_uint32 index_b) |
This is used to connect one parameter to another parameter by explicity indexing when the handles to the data objects are lost. | |
vx_status | vxSetAffineRotationMatrix (vx_matrix matrix, vx_float32 angle, vx_float32 scale, vx_float32 center_x, vx_float32 center_y) |
This helper is used to easily set the affine matrix to a rotation and scale. | |
vx_status | vxAlterRectangle (vx_rectangle_t *rect, vx_int32 dsx, vx_int32 dsy, vx_int32 dex, vx_int32 dey) |
[Helper] This function changes the points of a rectangle by some delta value per coordinate. | |
vx_status | vxAddParameterToGraphByIndex (vx_graph g, vx_node n, vx_uint32 index) |
Adds a parameter to a graph by indicating the source node, and the index of the parameter on the node. | |
vx_bool | vxFindOverlapRectangle (vx_rectangle_t *rect_a, vx_rectangle_t *rect_b, vx_rectangle_t *rect_res) |
Find the overlapping rectange between two rectangles. | |
void | vxReadRectangle (const void *base, const vx_imagepatch_addressing_t *addr, const vx_border_t *borders, vx_df_image type, vx_uint32 center_x, vx_uint32 center_y, vx_uint32 radius_x, vx_uint32 radius_y, void *destination, vx_uint32 border_x_start) |
Read a rectangle-shaped section of an image into a 2D array. | |
vx_int64 | vxDivFloor (vx_int64 x, vx_int64 y) |
Integer division with rounding towards minus infinity. | |
The helper is an non-standardized set of convenience constructs for OpenVX.
These functions use only the OpenVX API in order to implement their functionality. As such structures, objects, defines, typedefs and functions defined herein are not part of the OpenVX standard, and are included as EXAMPLE code only.
#define dimof | ( | x | ) |
#include <vx_helper.h>
A helper macro to determine the number of elements in an array.
#define VX_MAX_LOG_NUM_ENTRIES (1024) |
#include <vx_helper.h>
Maximum number of supported entries.
#define VX_TAU 6.28318530717958647692 |
#include <vx_helper.h>
A definition for TAU, or 2*PI.
typedef struct _vx_kernel_description_t vx_kernel_description_t |
#include <vx_helper.h>
Contains everything needed to abstractly describe a kernel. This is used to declare kernels at compile time.
typedef struct _vx_log_entry_t vx_log_entry_t |
#include <vx_helper.h>
A log entry contains the graph reference, a status and a message.
#include <vx_helper.h>
The log of a graph.
typedef struct _vx_param_description_t vx_param_description_t |
#include <vx_helper.h>
Contains everything needed to abstractly describe a parameter to a kernel. This is used to declare kernel parameters at compile time.
#include <vx_helper.h>
Adds a parameter to a graph by indicating the source node, and the index of the parameter on the node.
[in] | g | The graph handle. |
[in] | n | The node handle. |
[in] | index | The index of the parameter on the node. |
vx_status vxAlterRectangle | ( | vx_rectangle_t * | rect, |
vx_int32 | dsx, | ||
vx_int32 | dsy, | ||
vx_int32 | dex, | ||
vx_int32 | dey ) |
#include <vx_helper.h>
[Helper] This function changes the points of a rectangle by some delta value per coordinate.
[in] | rect | The rectangle to modify. |
[in] | dsx | The start x delta. |
[in] | dsy | The start y delta. |
[in] | dex | The end x delta. |
[in] | dey | The end y delta. |
VX_SUCCESS | Modified rectangle. |
VX_ERROR_INVALID_REFERENCE | Not a valid rectangle. |
void vxClearLog | ( | vx_reference | ref | ) |
#include <vx_helper.h>
A method to clear out the log for a particular reference, such as a graph.
[in] | ref | The reference to remove from the log. |
vx_node vxCreateNodeByStructure | ( | vx_graph | graph, |
vx_enum | kernelenum, | ||
vx_reference | params[], | ||
vx_uint32 | num ) |
#include <vx_helper.h>
A method to construct a node via arbitrary parameters and an enum.
[in] | graph | The handle to desired graph to add the node to. |
[in] | kernelenum | The vx_kernel_e enum value used to create a node. |
[in] | params | The array of parameter information. |
[in] | num | The number of elements in params. |
0 | Indicates a failure. |
#include <vx_helper.h>
Integer division with rounding towards minus infinity.
vx_bool vxFindOverlapRectangle | ( | vx_rectangle_t * | rect_a, |
vx_rectangle_t * | rect_b, | ||
vx_rectangle_t * | rect_res ) |
#include <vx_helper.h>
Find the overlapping rectange between two rectangles.
vx_status vxGetLogEntry | ( | vx_reference | ref, |
char | message[VX_MAX_LOG_MESSAGE_LEN] ) |
#include <vx_helper.h>
Returns the previous entry of the log. When called consecutively it will return the entire log. The log will be cleared by reading it.
[in] | ref | The reference to filter the log entries against. If the context is given, the next entry will be returned. |
[out] | message | A predefined location to store a copy of the log's message value. This must point to at least VX_MAX_LOG_MESSAGE_LEN bytes of characters. |
vx_status_e
.vx_status vxLinkParametersByIndex | ( | vx_node | node_a, |
vx_uint32 | index_a, | ||
vx_node | node_b, | ||
vx_uint32 | index_b ) |
#include <vx_helper.h>
This is used to connect one parameter to another parameter by explicity indexing when the handles to the data objects are lost.
[in] | node_a | The source node to link from. |
[in] | index_a | The index of the vx_parameter to link from. |
[in] | node_b | The sink node to link to. |
[in] | index_b | The index of the vx_parameter to link to. |
vx_status vxLinkParametersByReference | ( | vx_parameter | a, |
vx_parameter | b ) |
#include <vx_helper.h>
This is used to connect one node parameter to another node parameter when the original handles to the data objects are already lost. The context determines if a buffer is necessary or can be optimized out.
[in] | a | The first parameter |
[in] | b | The second parameter |
void vxReadRectangle | ( | const void * | base, |
const vx_imagepatch_addressing_t * | addr, | ||
const vx_border_t * | borders, | ||
vx_df_image | type, | ||
vx_uint32 | center_x, | ||
vx_uint32 | center_y, | ||
vx_uint32 | radius_x, | ||
vx_uint32 | radius_y, | ||
void * | destination, | ||
vx_uint32 | border_x_start ) |
#include <vx_helper.h>
Read a rectangle-shaped section of an image into a 2D array.
void vxRegisterHelperAsLogReader | ( | vx_context | context | ) |
#include <vx_helper.h>
This enables the helper library logging feature to take over the error log callback and keep a database of previous log entries.
vx_status vxSetAffineRotationMatrix | ( | vx_matrix | matrix, |
vx_float32 | angle, | ||
vx_float32 | scale, | ||
vx_float32 | center_x, | ||
vx_float32 | center_y ) |
#include <vx_helper.h>
This helper is used to easily set the affine matrix to a rotation and scale.
[in] | matrix | The handle to the matrix. |
[in] | angle | The rotation angle in degrees. |
[in] | scale | The scaling value. Values less than one are enlarging. |
[in] | center_x | The center pixel in the x direction. |
[in] | center_y | The center pixel in the y direction. |