From 5f8e11bd3c39828b5ee887efa53102bda85b50c4 Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 9 Jun 2006 14:41:43 +0000 Subject: [PATCH] Some new functions specific to matrices of double git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2360 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/xbt/matrix.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/xbt/matrix.h b/include/xbt/matrix.h index d5b67a6eb6..1ffab4b8c6 100644 --- a/include/xbt/matrix.h +++ b/include/xbt/matrix.h @@ -31,17 +31,24 @@ typedef struct { /** @brief Quick retrieval of scalar content * @hideinitializer */ -#define xbt_matrix_get_as(mat,l,c,type) *(type*)xbt_matrix_getp(mat,l,c) +#define xbt_matrix_get_as(mat,l,c,type) *(type*)xbt_matrix_get_ptr(mat,l,c) xbt_matrix_t xbt_matrix_new(int lines, int rows, const unsigned long elmsize, void_f_pvoid_t * const free_f); + void xbt_matrix_free(xbt_matrix_t matrix); void xbt_matrix_free_voidp(void *d); -void xbt_matrix_dump(xbt_matrix_t matrix, const char *name, +void xbt_matrix_dump(xbt_matrix_t matrix, const char *name, int coords, void_f_pvoid_t display_fun); +void xbt_matrix_dump_display_double(void*d); + +xbt_matrix_t xbt_matrix_double_new_zeros(int lines, int rows); +xbt_matrix_t xbt_matrix_double_new_id(int lines, int rows); +xbt_matrix_t xbt_matrix_double_new_rand(int lines, int rows); +xbt_matrix_t xbt_matrix_double_new_mult(xbt_matrix_t A,xbt_matrix_t B); SG_END_DECL() -- 2.20.1