Setting INOUT and OUT arguments

To set INOUT and OUT arguments, use the diet_*_desc_set defined in DIET_server.h, these are helpful for writing “solve” functions only. Using these functions, the server developer must keep in mind the fact that he cannot alter the memory space pointed to by value fields on the server. Indeed, this would make DIET confused about how to manage the data5.1.

/**
 * If value                 is NULL,
 * or if order              is DIET_MATRIX_ORDER_COUNT,
 * or if nb_rows or nb_cols is 0,
 * or if path               is NULL,
 * then the corresponding field is not modified.
 */

int
diet_scalar_desc_set(diet_data_t* data, void* value);

// No use of diet_vector_desc_set: size should not be altered by server

// You can alter nb_r and nb_c, but the total size must remain the same
int
diet_matrix_desc_set(diet_data_t* data,
                     size_t nb_r, size_t nb_c, diet_matrix_order_t order);

// No use of diet_string_desc_set: length should not be altered by server

int
diet_file_desc_set(diet_data_t* data, char* path);



The DIET Team - Mer 29 nov 2017 15:13:36 EST