@@ -8,84 +8,86 @@ typedef struct RAI_ExecutionCtx RAI_ExecutionCtx;
88typedef void (* RAI_ExecutionCtx_Free_fn )(RAI_ExecutionCtx * ctx );
99
1010/**
11- * @brief Generic struct to hold execution contexts for DAG ops. This struct holds the input and output tensors of the op, as well as inheriting classes specific functionality.
12- *
11+ * @brief Generic struct to hold execution contexts for DAG ops. This struct holds the input and
12+ * output tensors of the op, as well as inheriting classes specific functionality.
13+ *
1314 */
1415typedef struct RAI_ExecutionCtx {
15- RAI_Tensor * * inputs ; // DAG op input tensors.
16- RAI_Tensor * * outputs ; // DAG op output tensors.
17- RAI_ExecutionCtx_Free_fn freeFn ; // Inheriting execution context free function.
16+ RAI_Tensor * * inputs ; // DAG op input tensors.
17+ RAI_Tensor * * outputs ; // DAG op output tensors.
18+ RAI_ExecutionCtx_Free_fn freeFn ; // Inheriting execution context free function.
1819} RAI_ExecutionCtx ;
1920
2021/**
2122 * @brief Initializes an allocated RAI_ExecutionCtx.
22- *
23+ *
2324 * @param ctx - Execution context to initialize.
2425 * @param freeFn - Specific free function for inheriting execution contexts (script or model)
2526 */
2627void RAI_ExecutionCtx_Init (RAI_ExecutionCtx * ctx , RAI_ExecutionCtx_Free_fn freeFn );
2728
2829/**
29- * @brief Frees the execution context internal structures. To be used from an inhereting execution contxt.
30- *
30+ * @brief Frees the execution context internal structures. To be used from an inhereting execution
31+ * contxt.
32+ *
3133 * @param ctx - Execution context to Free.
3234 */
3335void RAI_ExecutionCtx_Free (RAI_ExecutionCtx * ctx );
3436
3537/**
3638 * @brief Returns the number of input tensors of the execution context.
37- *
39+ *
3840 * @param ctx - Execution context.
3941 * @return size_t - Number of input tensors.
4042 */
4143size_t RAI_ExecutionCtx_NumInputs (RAI_ExecutionCtx * ctx );
4244
4345/**
4446 * @brief Adds an input tensor to the execution context.
45- *
47+ *
4648 * @param ctx - Execution context.
4749 * @param t - Input tensor.
4850 */
4951void RAI_ExecutionCtx_AddInput (RAI_ExecutionCtx * ctx , RAI_Tensor * t );
5052
5153/**
5254 * @brief Returns an input tensor from the execution context, for a given index.
53- *
55+ *
5456 * @param ctx - Execution context.
55- * @param index
57+ * @param index
5658 * @return RAI_Tensor* - Input tensor.
5759 */
5860RAI_Tensor * RAI_ExecutionCtx_GetInput (RAI_ExecutionCtx * ctx , size_t index );
5961
6062/**
6163 * @brief Returns the number of output tensors/placeholders of the execution context.
62- *
64+ *
6365 * @param ctx - Execution context.
6466 * @return size_t - Number of output tensors/placeholders.
6567 */
6668size_t RAI_ExecutionCtx_NumOutputs (RAI_ExecutionCtx * ctx );
6769
6870/**
6971 * @brief Sets (appends) an output tensor placeholder to the execution context.
70- *
72+ *
7173 * @param ctx - Execution context.
7274 */
7375void RAI_ExecutionCtx_AddOuputPlaceholder (RAI_ExecutionCtx * ctx );
7476
7577/**
7678 * @brief Sets an output tensor in a specfic index, populated before by a placeholder.
77- *
79+ *
7880 * @param ctx - Execution context.
7981 * @param t - Output tensor.
80- * @param index
82+ * @param index
8183 */
8284void RAI_ExecutionCtx_SetOutput (RAI_ExecutionCtx * ctx , RAI_Tensor * t , size_t index );
8385
8486/**
8587 * @brief Returns an output tensor from the execution context, for a given index.
86- *
88+ *
8789 * @param ctx - Execution context.
88- * @param index
90+ * @param index
8991 * @return RAI_Tensor* - Output tensor.
9092 */
9193RAI_Tensor * RAI_ExecutionCtx_GetOutput (RAI_ExecutionCtx * ctx , size_t index );
0 commit comments