From: mquinson Date: Mon, 22 May 2006 09:02:31 +0000 (+0000) Subject: stupid me. col means row in french, so use line/row and not row/col, which means... X-Git-Tag: v3.3~3084 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0ba6247845b00a203edbc22f64c50a43f047fcdd stupid me. col means row in french, so use line/row and not row/col, which means nothing git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2274 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/examples/gras/mmrpc/mmrpc.h b/examples/gras/mmrpc/mmrpc.h index 4e5e1e6662..d33d1c8eaa 100644 --- a/examples/gras/mmrpc/mmrpc.h +++ b/examples/gras/mmrpc/mmrpc.h @@ -16,9 +16,9 @@ GRAS_DEFINE_TYPE(s_matrix, struct s_matrix { + int lines; int rows; - int cols; - double *ctn GRAS_ANNOTE(size, rows*cols); + double *ctn GRAS_ANNOTE(size, lines*rows); };) typedef struct s_matrix matrix_t; diff --git a/examples/gras/mmrpc/mmrpc_client.c b/examples/gras/mmrpc/mmrpc_client.c index edab230f20..2e45edb6ff 100644 --- a/examples/gras/mmrpc/mmrpc_client.c +++ b/examples/gras/mmrpc/mmrpc_client.c @@ -56,7 +56,7 @@ int client(int argc,char *argv[]) { /* 7. Prepare and send the request to the server */ - request[0].rows=request[0].cols=request[1].rows=request[1].cols=MATSIZE; + request[0].lines=request[0].rows=request[1].lines=request[1].rows=MATSIZE; request[0].ctn=xbt_malloc0(sizeof(double)*MATSIZE*MATSIZE); request[1].ctn=xbt_malloc0(sizeof(double)*MATSIZE*MATSIZE); diff --git a/examples/gras/mmrpc/mmrpc_common.c b/examples/gras/mmrpc/mmrpc_common.c index ba4d0f50e5..27dc89ef42 100644 --- a/examples/gras/mmrpc/mmrpc_common.c +++ b/examples/gras/mmrpc/mmrpc_common.c @@ -26,11 +26,11 @@ void mmrpc_register_messages(void) { 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(">>> Matrix %s dump (%d x %d)\n",name,mat->lines,mat->rows); + for (i=0; ilines; i++) { printf(" "); - for (j=0; jcols; j++) - printf(" %.2f",mat->ctn[i*mat->cols + j]); + for (j=0; jrows; j++) + printf(" %.2f",mat->ctn[i*mat->rows + j]); printf("\n"); } printf("<<< end_of_matrix %s dump\n",name); diff --git a/examples/gras/mmrpc/mmrpc_server.c b/examples/gras/mmrpc/mmrpc_server.c index 9d8bc211e7..8d94a0d9c0 100644 --- a/examples/gras/mmrpc/mmrpc_server.c +++ b/examples/gras/mmrpc/mmrpc_server.c @@ -22,15 +22,15 @@ static int server_cb_request_handler(gras_msg_cb_ctx_t ctx, void *payload_data) int i,j,k; /* 2. Make some room to return the result */ - result.rows = data[0].rows; - result.cols = data[1].cols; - result.ctn = xbt_malloc0(sizeof(double) * result.rows * result.cols); + result.lines = data[0].lines; + result.rows = data[1].rows; + result.ctn = xbt_malloc0(sizeof(double) * result.lines * result.rows); /* 3. Do the computation */ - for (i=0; i