Declaring services

Every service must be added in the service table before the server is launched. The complete service table API is defined in DIET_server.h:

typedef int (* diet_solve_t)(diet_profile_t *);
int diet_service_table_init(int max_size);
int diet_service_table_add(diet_profile_desc_t *profile,
                           diet_convertor_t    *cvt,
                           diet_solve_t         solve_func);
void diet_print_service_table();

The parameter diet_solve_t solve_func is the type of the solve_service function: a function pointer used by DIET to launch the computation.

The parameter diet_convertor_t *cvt is to be used in combination with scheduling facilities (if available). It is there to allow profile conversion (for multiple services, or when differences occur between the DIET and the scheduling facility profile). Profile conversion is complicated and will be treated separately in Chapter 10.



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