The OpenVX Specification
r31169
|
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 VX_API_CALL | vxAccessDistribution (vx_distribution distribution, void **ptr, vx_enum usage) |
Grants access to a distribution object and increments the object reference count in case of success. More... | |
vx_status VX_API_CALL | vxCommitDistribution (vx_distribution distribution, const void *ptr) |
Commits the distribution objec> and decrements the object reference count in case of success. The memory must be a vx_uint32 array of a value at least as big as the value returned via VX_DISTRIBUTION_ATTRIBUTE_BINS . More... | |
vx_distribution VX_API_CALL | vxCreateDistribution (vx_context context, vx_size numBins, vx_int32 offset, vx_uint32 range) |
Creates a reference to a 1D Distribution of a consecutive interval [offset, offset + range - 1] defined by a start offset and valid range, divided equally into numBins parts. More... | |
vx_status VX_API_CALL | vxQueryDistribution (vx_distribution distribution, vx_enum attribute, void *ptr, vx_size size) |
Queries a Distribution object. More... | |
vx_status VX_API_CALL | 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. 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 854 of file vx_types.h.
vx_distribution VX_API_CALL vxCreateDistribution | ( | vx_context | context, |
vx_size | numBins, | ||
vx_int32 | offset, | ||
vx_uint32 | range | ||
) |
Creates a reference to a 1D Distribution of a consecutive interval [offset, offset + range - 1] defined by a start offset and valid range, divided equally into numBins parts.
[in] | context | The reference to the overall context. |
[in] | numBins | The number of bins in the distribution. |
[in] | offset | The start offset into the range value that marks the begining of the 1D Distribution. |
[in] | range | The total number of the values. |
vx_distribution
. Any possible errors preventing a successful creation should be checked using vxGetStatus
. vx_status VX_API_CALL 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 distribution is not a vx_distribution . |
vx_status VX_API_CALL 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 in bytes of the container to which ptr points. |
vx_status_e
enumeration. vx_status VX_API_CALL vxAccessDistribution | ( | vx_distribution | distribution, |
void ** | ptr, | ||
vx_enum | usage | ||
) |
Grants access to a distribution object and increments the object reference count in case of success.
[in] | distribution | The reference to the distribution to access. |
[in,out] | ptr | The user-supplied address to a pointer, via which the requested contents are returned.
|
[in] | usage | The vx_accessor_e value to describe the access of the object. |
vx_status_e
enumeration. vxCommitDistribution
vx_status VX_API_CALL vxCommitDistribution | ( | vx_distribution | distribution, |
const void * | ptr | ||
) |
Commits the distribution objec> and decrements the object reference count in case of success. The memory must be a vx_uint32 array of a value at least as big as the value returned via VX_DISTRIBUTION_ATTRIBUTE_BINS
.
[in] | distribution | The Distribution to modify. |
[in] | ptr | The pointer provided or returned by vxAccessDistribution . The ptr cannot be NULL. |
vx_status_e
enumeration. vxAccessDistribution
.