X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/12538c6ab1bc03405ac74e6b2995ba1b4ee29bfa..0c2ff3268deebf7a4ccc059a3142ca129353f9e2:/examples/gras/mmrpc/mmrpc_common.c diff --git a/examples/gras/mmrpc/mmrpc_common.c b/examples/gras/mmrpc/mmrpc_common.c index ba4d0f50e5..09df91090a 100644 --- a/examples/gras/mmrpc/mmrpc_common.c +++ b/examples/gras/mmrpc/mmrpc_common.c @@ -9,32 +9,18 @@ #include "mmrpc.h" -XBT_LOG_NEW_DEFAULT_CATEGORY(MatMult,"Messages specific to this example"); +XBT_LOG_NEW_DEFAULT_CATEGORY(MatMult, "Messages specific to this example"); /* register messages which may be sent and their payload (common to client and server) */ -void mmrpc_register_messages(void) { +void mmrpc_register_messages(void) +{ gras_datadesc_type_t matrix_type, request_type; - matrix_type=gras_datadesc_by_symbol(s_matrix); - request_type=gras_datadesc_array_fixed("matrix_t[2]",matrix_type,2); - + matrix_type = gras_datadesc_matrix(gras_datadesc_by_name("double"), NULL); + request_type = + gras_datadesc_array_fixed("s_matrix_t(double)[2]", matrix_type, 2); + gras_msgtype_declare("answer", matrix_type); gras_msgtype_declare("request", request_type); } - -void mat_dump(matrix_t *mat, const char* name) { - int i,j; - - printf(">>> Matrix %s dump (%d x %d)\n",name,mat->rows,mat->cols); - for (i=0; irows; i++) { - printf(" "); - for (j=0; jcols; j++) - printf(" %.2f",mat->ctn[i*mat->cols + j]); - printf("\n"); - } - printf("<<< end_of_matrix %s dump\n",name); -} - - -