DAGDA put data macros/functions
The following functions put a data on the DAGDA hierarchy to be used
later. The last parameter is always a pointer to a C-string which
will be initialized with a pointer to the ID string of the data. This
string is allocated by DAGDA and can be freed when the user does not
need it anymore. The first parameter is always a pointer to the
data: for a scalar value a pointer on the data, for a vector, matrix
or string, a pointer on the first element of the data. The
“value” argument for a file is a C-string containing the path
of this file. The persistence mode for a data managed by DAGDA should
allways be DIET_PERSISTENT or DIET_STICKY. The VOLATILE and
*_RETURN modes do not make sense in this data management context.
- -
dagda_put_scalar(void* value, diet_base_type_t base_type,
diet_persistence_mode_t mode, char** ID)
:
This macro adds to the platform the scalar data of type
“base_type” pointed by “value” with the
persistence mode “mode” (DIET_PERSISTENT or DIET_STICKY)
and initializes “*ID” with the ID of the data.
- -
dagda_put_vector(void* value, diet_base_type_t base_type,
diet_persistent_mode_t mode, size_t size, char** ID)
:
This macro adds to the platform the vector of “size”
“base_type” elements pointed by “value” with the
persistence mode “mode” and stores the data ID in
“ID”.
- -
dagda_put_matrix(void* value, diet_base_type_t base_type,
diet_persistence_mode_t mode, size_t nb_rows,
size_t nb_cols, diet_matrix_order_t order, char** ID)
:
This macro adds to the platform the “base_type” matrix of
dimension “nb_rows” “nb_cols” stored in
“order” order. The data ID is stored on “ID”.
- -
dagda_put_string(char* value, diet_persistence_mode_t mode, char** ID)
:
This macro adds to the platform the string pointed by
“value” with the persistence mode “mode” and
stores the data ID into “ID”.
- -
dagda_put_file(char* path, diet_persistence_mode_t mode, char**ID)
:
This macro adds the file of path “path” with the persistence
mode “mode” to the platform and stores the data ID into
“ID”
The DIET Team - Mer 29 nov 2017 15:13:36 EST