![]() |
The OpenVX Specification
r28647
|
Defines the Distribution Object Interface.
Typedefs | |
| typedef struct _vx_distribution * | vx_distribution |
| The Distribution object. This has a user-defined number of bins over a user-defined range (within a uint32_t range). | |
Enumerations | |
| enum | vx_distribution_attribute_e { VX_DISTRIBUTION_ATTRIBUTE_DIMENSIONS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_DISTRIBUTION << 8)) + 0x0, VX_DISTRIBUTION_ATTRIBUTE_OFFSET = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_DISTRIBUTION << 8)) + 0x1, VX_DISTRIBUTION_ATTRIBUTE_RANGE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_DISTRIBUTION << 8)) + 0x2, VX_DISTRIBUTION_ATTRIBUTE_BINS = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_DISTRIBUTION << 8)) + 0x3, VX_DISTRIBUTION_ATTRIBUTE_WINDOW = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_DISTRIBUTION << 8)) + 0x4, VX_DISTRIBUTION_ATTRIBUTE_SIZE = ((( VX_ID_KHRONOS ) << 20) | ( VX_TYPE_DISTRIBUTION << 8)) + 0x5 } |
| The distribution attribute list. More... | |
Functions | |
| vx_status | vxAccessDistribution (vx_distribution distribution, void **ptr, vx_enum usage) |
| Gets direct access to a Distribution in memory. More... | |
| vx_status | vxCommitDistribution (vx_distribution distribution, void *ptr) |
Sets the Distribution back to the memory. The memory must be a vx_uint32 array of a value at least as big as the value returned via VX_DISTRIBUTION_ATTRIBUTE_RANGE. More... | |
| vx_distribution | vxCreateDistribution (vx_context context, vx_size numBins, vx_size offset, vx_size range) |
| Creates a reference to a 1D Distribution with a start offset, valid range, and number of equally weighted bins. More... | |
| vx_status | vxQueryDistribution (vx_distribution distribution, vx_enum attribute, void *ptr, vx_size size) |
| Queries a Distribution object. More... | |
| vx_status | vxReleaseDistribution (vx_distribution *distribution) |
| Releases a reference to a distribution object. The object may not be garbage collected until its total reference count is zero. More... | |
The distribution attribute list.
| Enumerator | |
|---|---|
| VX_DISTRIBUTION_ATTRIBUTE_DIMENSIONS |
Indicates the number of dimensions in the distribution. Use a |
| VX_DISTRIBUTION_ATTRIBUTE_OFFSET |
Indicates the start of the values to use (inclusive). Use a |
| VX_DISTRIBUTION_ATTRIBUTE_RANGE |
Indicates end value to use as the range (exclusive). Use a |
| VX_DISTRIBUTION_ATTRIBUTE_BINS |
Indicates the number of bins. Use a |
| VX_DISTRIBUTION_ATTRIBUTE_WINDOW |
Indicates the range of a bin. Use a |
| VX_DISTRIBUTION_ATTRIBUTE_SIZE |
Indicates the total size of the distribution in bytes. Use a |
Definition at line 820 of file vx_types.h.
| vx_distribution vxCreateDistribution | ( | vx_context | context, |
| vx_size | numBins, | ||
| vx_size | offset, | ||
| vx_size | range | ||
| ) |
Creates a reference to a 1D Distribution with a start offset, valid range, and number of equally weighted bins.
| [in] | context | The reference to the overall context. |
| [in] | numBins | The number of bins in the distribution. |
| [in] | offset | The offset into the range value. |
| [in] | range | The total range of the values. |
vx_distribution | vx_status vxReleaseDistribution | ( | vx_distribution * | distribution | ) |
Releases a reference to a distribution object. The object may not be garbage collected until its total reference count is zero.
| [in] | distribution | The reference to the distribution to release. |
vx_status_e enumeration. | VX_SUCCESS | No errors. |
| VX_ERROR_INVALID_REFERENCE | If graph is not a vx_graph. |
| vx_status vxQueryDistribution | ( | vx_distribution | distribution, |
| vx_enum | attribute, | ||
| void * | ptr, | ||
| vx_size | size | ||
| ) |
Queries a Distribution object.
| [in] | distribution | The reference to the distribution to query. |
| [in] | attribute | The attribute to query. Use a vx_distribution_attribute_e enumeration. |
| [out] | ptr | The location at which to store the resulting value. |
| [in] | size | The size of the container to which ptr points. |
vx_status_e enumeration. | vx_status vxAccessDistribution | ( | vx_distribution | distribution, |
| void ** | ptr, | ||
| vx_enum | usage | ||
| ) |
Gets direct access to a Distribution in memory.
| [in] | distribution | The reference to the distribution to access. |
| [out] | ptr | The address of the location to store the pointer to the Distribution memory.
vxCommitDistribution must be called with (*ptr). |
| [in] | usage | The vx_accessor_e value to describe the access of the object. |
vx_status_e enumeration. vxCommitDistribution | vx_status vxCommitDistribution | ( | vx_distribution | distribution, |
| void * | ptr | ||
| ) |
Sets the Distribution back to the memory. The memory must be a vx_uint32 array of a value at least as big as the value returned via VX_DISTRIBUTION_ATTRIBUTE_RANGE.
| [in] | distribution | The Distribution to modify. |
| [in] | ptr | The pointer returned from (or not modified by) vxAccessDistribution. |
vx_status_e enumeration. vxAccessDistribution.