The Internal Scalar API.
More...
|
| | coreflow::Scalar::Scalar (vx_context context, vx_reference scope) |
| | Construct a new Scalar object.
|
| |
| | coreflow::Scalar::~Scalar () |
| | Destroy the Scalar object.
|
| |
| static vx_scalar | coreflow::Scalar::createScalar (vx_context context, vx_enum data_type, const void *ptr) |
| | Create a scalar object.
|
| |
| void * | coreflow::Scalar::allocateScalarMemory (vx_size size) |
| | Allocate memory for scalar obj.
|
| |
| static vx_status | coreflow::Scalar::scalarToHostMem (vx_scalar scalar, void *user_ptr) |
| | Get host memory from scalar obj.
|
| |
| static vx_status | coreflow::Scalar::hostMemToScalar (vx_scalar scalar, void *user_ptr) |
| | Get scalar from host memory.
|
| |
| vx_status | coreflow::Scalar::copy (void *user_ptr, vx_enum usage, vx_enum user_mem_type) |
| | Copy scalar value to/from user memory.
|
| |
| vx_status | coreflow::Scalar::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 | coreflow::Scalar::readValue (void *ptr) |
| | Read the scalar value.
|
| |
| vx_status | coreflow::Scalar::writeValue (const void *ptr) |
| | Write the scalar value.
|
| |
| vx_enum | coreflow::Scalar::dataType () const |
| | Get the data type of the scalar.
|
| |
| static void | coreflow::Scalar::printScalarValue (vx_scalar scalar) |
| | Print scalar object.
|
| |
| void | coreflow::Scalar::destruct () override final |
| | Function to destroy scalar obj.
|
| |
The Internal Scalar API.
◆ allocateScalarMemory()
| void * coreflow::Scalar::allocateScalarMemory |
( |
vx_size | size | ) |
|
#include <vx_scalar.h>
Allocate memory for scalar obj.
- Parameters
-
| size | size of bytes to alloc |
- Returns
- void* pointer to allocated memory
◆ copy() [1/2]
#include <vx_scalar.h>
Copy scalar value to/from user memory.
- Parameters
-
| user_ptr | pointer to user memory |
| usage | usage of the memory (read/write) |
| user_mem_type | type of memory (host, opencl, etc.) |
- Returns
- vx_status VX_SUCCESS on success
◆ copy() [2/2]
#include <vx_scalar.h>
Copy scalar value, given size, to/from user memory.
- Parameters
-
| size | size of the scalar data |
| user_ptr | pointer to user memory |
| usage | usage of the memory (read/write) |
| user_mem_type | type of memory (host, opencl, etc.) |
- Returns
- vx_status VX_SUCCESS on success
◆ createScalar()
#include <vx_scalar.h>
Create a scalar object.
- Parameters
-
| context | The context associated with this obj |
| data_type | The data type of the scalar |
| ptr | The pointer to the scalar value |
- Returns
- vx_scalar The scalar object
◆ dataType()
| vx_enum coreflow::Scalar::dataType |
( |
| ) |
const |
#include <vx_scalar.h>
Get the data type of the scalar.
- Returns
- vx_enum The data type of the scalar
◆ destruct()
| void coreflow::Scalar::destruct |
( |
| ) |
|
|
finaloverridevirtual |
◆ hostMemToScalar()
#include <vx_scalar.h>
Get scalar from host memory.
- Parameters
-
| scalar | scalar obj |
| user_ptr | pointer to user memory |
- Returns
- vx_status VX_SUCCESS on success
◆ printScalarValue()
| static void coreflow::Scalar::printScalarValue |
( |
vx_scalar | scalar | ) |
|
|
static |
◆ readValue()
| vx_status coreflow::Scalar::readValue |
( |
void * | ptr | ) |
|
#include <vx_scalar.h>
Read the scalar value.
- Parameters
-
| ptr | Pointer to the memory location to read the value into |
- Returns
- vx_status VX_SUCCESS on success, error code otherwise
◆ Scalar()
#include <vx_scalar.h>
Construct a new Scalar object.
- Parameters
-
| context | The context associated with this obj |
| scope | The parent ref of this obj |
◆ scalarToHostMem()
#include <vx_scalar.h>
Get host memory from scalar obj.
- Parameters
-
| scalar | scalar obj |
| user_ptr | pointer to user memory |
- Returns
- vx_status VX_SUCCESS on success
◆ writeValue()
| vx_status coreflow::Scalar::writeValue |
( |
const void * | ptr | ) |
|
#include <vx_scalar.h>
Write the scalar value.
- Parameters
-
| ptr | Pointer to the memory location containing the value to write |
- Returns
- vx_status VX_SUCCESS on success, error code otherwise
◆ ~Scalar()
| coreflow::Scalar::~Scalar |
( |
| ) |
|