Open Deep Learning API
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions
odla_value.h File Reference

Go to the source code of this file.

Data Structures

struct  odla_scalar_value
 
struct  odla_value_shape
 Shape of value. More...
 
struct  odla_value_type
 Type of value. More...
 
struct  odla_values
 Multiple values. More...
 
struct  odla_value_ids
 Multiple value ids. More...
 

Macros

#define ODLA_MAX_DIMENSION   10
 Supported maximum dimension size. More...
 
#define ODLA_MAX_OUTPUTS   64
 Supported maximum output size. More...
 

Typedefs

typedef struct _odla_value * odla_value
 Value definition. More...
 
typedef struct _odla_value_id * odla_value_id
 Unique id of each value. More...
 

Functions

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueData (odla_value value, const odla_void *data_ptr)
 Set a value data. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueDataById (const odla_value_id value_id, const odla_void *data_ptr)
 Set a value data by id. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetRawDataPtr (const odla_value value, odla_void **data_ptr)
 Get the raw data ptr from value. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueDataById (const odla_value_id value_id, odla_void *data_ptr)
 Get a value data by id. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueType (const odla_value value, odla_value_type *value_type)
 Get the type of a value. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueTypeById (const odla_value_id value_id, odla_value_type *value_type)
 Get the type of a value by id. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueId (const odla_value value, odla_value_id *value_id)
 Get the id of a value. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_FindValueById (const odla_value_id value_id, odla_value *value)
 Return the value by id. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueAsOutput (odla_value value)
 Set a value as a computation output. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValuesAsOutput (odla_values values)
 Set multi values as a computation outputs. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueAsOutputById (const odla_value_id value_id)
 Set a value by id as a computation output. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_ReleaseValue (odla_value value)
 Release a value. More...
 
ODLA_API_EXPORT odla_status ODLA_API_CALL odla_ReleaseValueById (odla_value_id value_id)
 Release a value by id. More...
 
ODLA_API_EXPORT void ODLA_API_CALL odla_Dump (odla_value value)
 Dump the data of the odla_value for debugging purpose. More...
 

Detailed Description

This file defines the ODLA value related APIs.

Definition in file odla_value.h.

Macro Definition Documentation

◆ ODLA_MAX_DIMENSION

#define ODLA_MAX_DIMENSION   10

Supported maximum dimension size.

Definition at line 32 of file odla_value.h.

◆ ODLA_MAX_OUTPUTS

#define ODLA_MAX_OUTPUTS   64

Supported maximum output size.

Definition at line 35 of file odla_value.h.

Typedef Documentation

◆ odla_value

typedef struct _odla_value* odla_value

Value definition.

Definition at line 65 of file odla_value.h.

◆ odla_value_id

typedef struct _odla_value_id* odla_value_id

Unique id of each value.

Definition at line 74 of file odla_value.h.

Function Documentation

◆ odla_Dump()

ODLA_API_EXPORT void ODLA_API_CALL odla_Dump ( odla_value  value)

Dump the data of the odla_value for debugging purpose.

Parameters
valuethe value to be dumpped

◆ odla_FindValueById()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_FindValueById ( const odla_value_id  value_id,
odla_value value 
)

Return the value by id.

Parameters
value_idthe value id
valuethe pointer to the value with the id
Returns
odla_status

◆ odla_GetRawDataPtr()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetRawDataPtr ( const odla_value  value,
odla_void **  data_ptr 
)

Get the raw data ptr from value.

Parameters
valuethe value
data_ptrthe raw data pointer of the value
Returns
odla_status

◆ odla_GetValueDataById()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueDataById ( const odla_value_id  value_id,
odla_void data_ptr 
)

Get a value data by id.

Parameters
value_idthe value id
data_ptrthe pointer to the retrieved data buffer
Returns
odla_status

◆ odla_GetValueId()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueId ( const odla_value  value,
odla_value_id value_id 
)

Get the id of a value.

Parameters
valuethe value
value_idthe pointer to the retrieved value id
Returns
odla_status

◆ odla_GetValueType()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueType ( const odla_value  value,
odla_value_type value_type 
)

Get the type of a value.

Parameters
valuethe value
value_typethe pointer to the retrieved value type
Returns
odla_status

◆ odla_GetValueTypeById()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_GetValueTypeById ( const odla_value_id  value_id,
odla_value_type value_type 
)

Get the type of a value by id.

Parameters
value_idthe value id
value_typethe pointer to the retrieved value type
Returns
odla_status

◆ odla_ReleaseValue()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_ReleaseValue ( odla_value  value)

Release a value.

Parameters
valuethe value
Returns
odla_status

◆ odla_ReleaseValueById()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_ReleaseValueById ( odla_value_id  value_id)

Release a value by id.

Parameters
value_idthe value id
Returns
odla_status

◆ odla_SetValueAsOutput()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueAsOutput ( odla_value  value)

Set a value as a computation output.

Parameters
valuethe value
Returns
odla_status

◆ odla_SetValueAsOutputById()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueAsOutputById ( const odla_value_id  value_id)

Set a value by id as a computation output.

Parameters
value_idthe value id
Returns
odla_status

◆ odla_SetValueData()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueData ( odla_value  value,
const odla_void data_ptr 
)

Set a value data.

Parameters
valuethe pointer to the value
data_ptrthe pointer to the raw data buffer
Returns
odla_status

◆ odla_SetValueDataById()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValueDataById ( const odla_value_id  value_id,
const odla_void data_ptr 
)

Set a value data by id.

Parameters
value_idthe value id
data_ptrthe pointer to the raw data buffer
Returns
odla_status

◆ odla_SetValuesAsOutput()

ODLA_API_EXPORT odla_status ODLA_API_CALL odla_SetValuesAsOutput ( odla_values  values)

Set multi values as a computation outputs.

Parameters
valuethe values
Returns
odla_status