CoreFlow 1.0.0
A modern orchestration and execution runtime
|
#include <vx_scalar.h>
Public Member Functions | |
Scalar (vx_context context, vx_reference scope) | |
Construct a new Scalar object. | |
~Scalar () | |
Destroy the Scalar object. | |
void * | allocateScalarMemory (vx_size size) |
Allocate memory for scalar obj. | |
vx_status | copy (void *user_ptr, vx_enum usage, vx_enum user_mem_type) |
Copy scalar value to/from user memory. | |
vx_status | copy (vx_size size, void *user_ptr, vx_enum usage, vx_enum user_mem_type) |
Copy scalar value, given size, to/from user memory. | |
vx_status | readValue (void *ptr) |
Read the scalar value. | |
vx_status | writeValue (const void *ptr) |
Write the scalar value. | |
vx_enum | dataType () const |
Get the data type of the scalar. | |
void | destruct () override final |
Function to destroy scalar obj. | |
vx_uint32 | refCount () const |
Returns the reference count of the object. | |
const vx_char * | refName () const |
Returns the name of the reference. | |
void | setName (const vx_char *name) |
Sets the name of the reference. | |
vx_uint32 | incrementReference (vx_reftype_e refType) |
Increments the ref count. | |
vx_uint32 | decrementReference (vx_reftype_e refType) |
Decrements the ref count. | |
vx_uint32 | totalReferenceCount () |
Returns the total reference count of the object. | |
void | initReferenceForDelay (vx_delay delay, vx_int32 index) |
Used to initialize any vx_reference as a delay element. | |
Static Public Member Functions | |
static vx_scalar | createScalar (vx_context context, vx_enum data_type, const void *ptr) |
Create a scalar object. | |
static vx_status | scalarToHostMem (vx_scalar scalar, void *user_ptr) |
Get host memory from scalar obj. | |
static vx_status | hostMemToScalar (vx_scalar scalar, void *user_ptr) |
Get scalar from host memory. | |
static void | printScalarValue (vx_scalar scalar) |
Print scalar object. | |
static vx_reference | createReference (vx_context context, vx_enum type, vx_reftype_e refType, vx_reference scope) |
Used to create a reference. | |
static void | printReference (vx_reference ref) |
Prints the values of a reference. | |
static vx_bool | isValidReference (vx_reference ref) |
Used to validate everything but vx_context, vx_image and vx_buffer. | |
static vx_bool | isValidReference (vx_reference ref, vx_enum type) |
Used to validate everything but vx_context, vx_image and vx_buffer. | |
static vx_size | sizeOfType (vx_enum type) |
Returns the number of bytes in the internal structure for a given type. | |
static vx_status | releaseReference (vx_reference *ref, vx_enum type, vx_reftype_e reftype, vx_destructor_f special_destructor) |
Used to destroy a reference. | |
Public Attributes | ||
vx_enum | data_type | |
The atomic type of the scalar. | ||
union { | ||
vx_char chr | ||
A character. More... | ||
vx_int8 s08 | ||
Signed 8 bit. More... | ||
vx_uint8 u08 | ||
Unsigned 8 bit. More... | ||
vx_int16 s16 | ||
Signed 16 bit. More... | ||
vx_uint16 u16 | ||
Unsigned 16 bit. More... | ||
vx_int32 s32 | ||
Signed 32 bit. More... | ||
vx_uint32 u32 | ||
Unsigned 32 bit. More... | ||
vx_int64 s64 | ||
Signed 64 bit. More... | ||
vx_uint64 u64 | ||
Unsigned 64 bit. More... | ||
vx_float32 f32 | ||
32 bit float More... | ||
vx_float64 f64 | ||
64 bit float More... | ||
vx_df_image fcc | ||
32 bit image format code More... | ||
vx_enum enm | ||
Signed 32 bit. More... | ||
vx_size size | ||
Architecture depth unsigned value. More... | ||
vx_bool boolean | ||
Boolean Values. More... | ||
} | data | |
The value contained in the reference for a scalar type. | ||
void * | data_addr | |
Only used to scalar with size. | ||
vx_size | data_len | |
The length of pointer data_addr. | ||
struct _vx_platform * | platform | |
Platform for ICD compatibility. | ||
vx_uint32 | magic | |
Used to validate references, must be set to VX_MAGIC. | ||
vx_enum | type | |
Set to an enum value in vx_type_e. | ||
vx_context | context | |
Pointer to the top level context. If this reference is the context, this will be NULL. | ||
vx_reference | scope | |
The pointer to the object's scope parent. When virtual objects are scoped within a graph, this will point to that parent graph. This is left generic to allow future scoping variations. By default scope should be the same as context. | ||
vx_uint32 | external_count | |
The count of the number of users with this reference. When greater than 0, this can not be freed. When zero, the value can be considered inaccessible. | ||
vx_uint32 | internal_count | |
The count of the number of framework references. When greater than 0, this can not be freed. | ||
vx_uint32 | read_count | |
The number of times the object has been read (in some portion) | ||
vx_uint32 | write_count | |
The number of times the object has been written to (in some portion) | ||
vx_sem_t | lock | |
The reference lock which is used to protect access to "in-fly" data. | ||
void * | reserved | |
A reserved field which can be used to store anonymous data. | ||
vx_uint32 | index | |
A field which can be used to store a temporary, per-graph index. | ||
vx_bool | extracted | |
This indicates if the object was extracted from another object. | ||
vx_bool | is_virtual | |
This indicates if the object is virtual or not. | ||
vx_delay | delay | |
vx_int32 | delay_slot_index | |
vx_bool | is_accessible | |
This indicates that if the object is virtual whether it is accessible at the moment or not. | ||
vx_char | name [VX_MAX_REFERENCE_NAME] | |
The reference name. | ||
vx_bool coreflow::Scalar::boolean |
Boolean Values.
vx_char coreflow::Scalar::chr |
A character.
|
inherited |
Pointer to the top level context. If this reference is the context, this will be NULL.
union { ... } coreflow::Scalar::data |
The value contained in the reference for a scalar type.
void* coreflow::Scalar::data_addr |
Only used to scalar with size.
vx_size coreflow::Scalar::data_len |
The length of pointer data_addr.
vx_enum coreflow::Scalar::data_type |
The atomic type of the scalar.
|
inherited |
|
inherited |
vx_enum coreflow::Scalar::enm |
Signed 32 bit.
|
inherited |
The count of the number of users with this reference. When greater than 0, this can not be freed. When zero, the value can be considered inaccessible.
|
inherited |
This indicates if the object was extracted from another object.
vx_float32 coreflow::Scalar::f32 |
32 bit float
vx_float64 coreflow::Scalar::f64 |
64 bit float
vx_df_image coreflow::Scalar::fcc |
32 bit image format code
|
inherited |
A field which can be used to store a temporary, per-graph index.
|
inherited |
The count of the number of framework references. When greater than 0, this can not be freed.
|
inherited |
This indicates that if the object is virtual whether it is accessible at the moment or not.
|
inherited |
This indicates if the object is virtual or not.
|
inherited |
The reference lock which is used to protect access to "in-fly" data.
|
inherited |
Used to validate references, must be set to VX_MAGIC.
|
inherited |
The reference name.
|
inherited |
Platform for ICD compatibility.
|
inherited |
The number of times the object has been read (in some portion)
|
inherited |
A reserved field which can be used to store anonymous data.
vx_int8 coreflow::Scalar::s08 |
Signed 8 bit.
vx_int16 coreflow::Scalar::s16 |
Signed 16 bit.
vx_int32 coreflow::Scalar::s32 |
Signed 32 bit.
vx_int64 coreflow::Scalar::s64 |
Signed 64 bit.
|
inherited |
The pointer to the object's scope parent. When virtual objects are scoped within a graph, this will point to that parent graph. This is left generic to allow future scoping variations. By default scope should be the same as context.
vx_size coreflow::Scalar::size |
Architecture depth unsigned value.
vx_uint8 coreflow::Scalar::u08 |
Unsigned 8 bit.
vx_uint16 coreflow::Scalar::u16 |
Unsigned 16 bit.
vx_uint32 coreflow::Scalar::u32 |
Unsigned 32 bit.
vx_uint64 coreflow::Scalar::u64 |
Unsigned 64 bit.
|
inherited |
The number of times the object has been written to (in some portion)