![]() |
The OpenVX Specification
r31169
|
Defines the Matrix Object Interface.
Typedefs | |
| typedef struct _vx_matrix * | vx_matrix |
| The Matrix Object. An MxN matrix of some unit type. | |
Enumerations | |
| enum | vx_matrix_attribute_e { VX_MATRIX_ATTRIBUTE_TYPE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_MATRIX << 8)) + 0x0, VX_MATRIX_ATTRIBUTE_ROWS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_MATRIX << 8)) + 0x1, VX_MATRIX_ATTRIBUTE_COLUMNS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_MATRIX << 8)) + 0x2, VX_MATRIX_ATTRIBUTE_SIZE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_MATRIX << 8)) + 0x3 } |
| The matrix attributes. More... | |
Functions | |
| vx_matrix VX_API_CALL | vxCreateMatrix (vx_context c, vx_enum data_type, vx_size columns, vx_size rows) |
| Creates a reference to a matrix object. More... | |
| vx_status VX_API_CALL | vxQueryMatrix (vx_matrix mat, vx_enum attribute, void *ptr, vx_size size) |
| Queries an attribute on the matrix object. More... | |
| vx_status VX_API_CALL | vxReadMatrix (vx_matrix mat, void *array) |
| Gets the matrix data (copy). More... | |
| vx_status VX_API_CALL | vxReleaseMatrix (vx_matrix *mat) |
| Releases a reference to a matrix object. The object may not be garbage collected until its total reference count is zero. More... | |
| vx_status VX_API_CALL | vxWriteMatrix (vx_matrix mat, const void *array) |
| Sets the matrix data (copy) More... | |
The matrix attributes.
| Enumerator | |
|---|---|
| VX_MATRIX_ATTRIBUTE_TYPE |
The value type of the matrix. Use a |
| VX_MATRIX_ATTRIBUTE_ROWS |
The M dimension of the matrix. Use a |
| VX_MATRIX_ATTRIBUTE_COLUMNS |
The N dimension of the matrix. Use a |
| VX_MATRIX_ATTRIBUTE_SIZE |
The total size of the matrix in bytes. Use a |
Definition at line 902 of file vx_types.h.
| vx_matrix VX_API_CALL vxCreateMatrix | ( | vx_context | c, |
| vx_enum | data_type, | ||
| vx_size | columns, | ||
| vx_size | rows | ||
| ) |
Creates a reference to a matrix object.
| [in] | c | The reference to the overall context. |
| [in] | data_type | The unit format of the matrix. VX_TYPE_INT32 or VX_TYPE_FLOAT32. |
| [in] | columns | The first dimensionality. |
| [in] | rows | The second dimensionality. |
vx_matrix. Any possible errors preventing a successful creation should be checked using vxGetStatus. Releases a reference to a matrix object. The object may not be garbage collected until its total reference count is zero.
| [in] | mat | The matrix reference to release. |
vx_status_e enumeration. | VX_SUCCESS | No errors. |
| VX_ERROR_INVALID_REFERENCE | If mat is not a vx_matrix. |
Queries an attribute on the matrix object.
| [in] | mat | The matrix object to set. |
| [in] | attribute | The attribute to query. Use a vx_matrix_attribute_e enumeration. |
| [out] | ptr | The location at which to store the resulting value. |
| [in] | size | The size in bytes of the container to which ptr points. |
vx_status_e enumeration. Gets the matrix data (copy).
| [in] | mat | The reference to the matrix. |
| [out] | array | The array in which to place the matrix. |
VX_MATRIX_ATTRIBUTE_COLUMNS and VX_MATRIX_ATTRIBUTE_ROWS to get the needed number of elements of the array. vx_status_e enumeration. Sets the matrix data (copy)
| [in] | mat | The reference to the matrix. |
| [in] | array | The array containing the matrix to be written. |
VX_MATRIX_ATTRIBUTE_COLUMNS and VX_MATRIX_ATTRIBUTE_ROWS to get the needed number of elements of the array.' vx_status_e enumeration.