|
Open Deep Learning API
|
Go to the source code of this file.
Enumerations | |
| enum | odla_loop_output_mode { ODLA_LOOP_LAST_VALUE , ODLA_LOOP_FWD_BEFORE , ODLA_LOOP_FWD_AFTER , ODLA_LOOP_REV_BEFORE , ODLA_LOOP_REV_AFTER } |
| Types of loop output. More... | |
Functions | |
| ODLA_API_EXPORT odla_value ODLA_API_CALL | odla_CreateLoopVariable (odla_value init_value, odla_value_id value_id) |
| Create a loop variable which has an initial value and recurrent values. More... | |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_BeginLoop (odla_value trip_count, odla_value_id value_id) |
| Create a loop. All subsequent loop related APIs are specific to this one until the correspoding odla_EndLoop is called. More... | |
| ODLA_API_EXPORT odla_values ODLA_API_CALL | odla_EndLoop (odla_value condition, odla_values output_values, const odla_loop_output_mode *flags, odla_value_ids) |
| ODLA_API_EXPORT odla_status ODLA_API_CALL | odla_BeginIf (odla_value condition, odla_value_id) |
| ODLA_API_EXPORT odla_status | odla_EnterBranchBody (odla_bool true_branch) |
| ODLA_API_EXPORT odla_values ODLA_API_CALL | odla_EndIf (odla_value_ids) |
This file defines the ODLA loop operators.
Definition in file odla_ops_control_flow.h.
Types of loop output.
| Enumerator | |
|---|---|
| ODLA_LOOP_LAST_VALUE | The value for the last iteration |
Definition at line 33 of file odla_ops_control_flow.h.
| ODLA_API_EXPORT odla_status ODLA_API_CALL odla_BeginLoop | ( | odla_value | trip_count, |
| odla_value_id | value_id | ||
| ) |
Create a loop. All subsequent loop related APIs are specific to this one until the correspoding odla_EndLoop is called.
| trip_count | the iteration count for the loop. The type of the value must be a scalar of integer. |
| value_id | a unique value id (can be NULL) |
| ODLA_API_EXPORT odla_value ODLA_API_CALL odla_CreateLoopVariable | ( | odla_value | init_value, |
| odla_value_id | value_id | ||
| ) |
Create a loop variable which has an initial value and recurrent values.
| init_value | initial value |
| value_id | a unique value id (can be NULL) |
| ODLA_API_EXPORT odla_values ODLA_API_CALL odla_EndLoop | ( | odla_value | condition, |
| odla_values | output_values, | ||
| const odla_loop_output_mode * | flags, | ||
| odla_value_ids | |||
| ) |
| condition | The boolean condition to end the loop. If it is NULL, the condition is assumed as True, therefore the loop will be solely controlled by the trip count defined in odla_BeginLoop. |
| output_values | The values as loop outputs. These values must be created by odla_CreateLoopVariable. |
| flags | Each output value has a corresponding flag. If the flag is not ODLA_LOOP_LAST_VALUE, an extra concatenated value will be returned. |
| value_ids | unique value ids (can be NULL) |