From f46df7b01ed1295b8de6ca4fcc33509ebe3101f4 Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Mon, 26 Sep 2022 22:49:53 +0200 Subject: [PATCH] descriptor: Add a dtype typ in the CHAM_tile_t structure to hold the precision of the tile --- control/descriptor.c | 17 +++++++++-------- include/chameleon/struct.h | 5 +++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/control/descriptor.c b/control/descriptor.c index 09130a5c3..2cbd9fd18 100644 --- a/control/descriptor.c +++ b/control/descriptor.c @@ -4,7 +4,7 @@ * * @copyright 2009-2014 The University of Tennessee and The University of * Tennessee Research Foundation. All rights reserved. - * @copyright 2012-2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * @copyright 2012-2023 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, * Univ. Bordeaux. All rights reserved. * *** @@ -18,7 +18,7 @@ * @author Guillaume Sylvand * @author Raphael Boucherie * @author Samuel Thibault - * @date 2022-02-22 + * @date 2022-12-13 * *** * @@ -100,12 +100,13 @@ void chameleon_desc_init_tiles( CHAM_desc_t *desc, blkrankof_fct_t rankof ) for( jj=0; jj<desc->lnt; jj++ ) { for( ii=0; ii<desc->lmt; ii++, tile++ ) { int rank = rankof( desc, ii, jj ); - tile->format = CHAMELEON_TILE_FULLRANK; - tile->rank = rank; - tile->m = ii == desc->lmt-1 ? desc->lm - ii * desc->mb : desc->mb; - tile->n = jj == desc->lnt-1 ? desc->ln - jj * desc->nb : desc->nb; - tile->mat = (rank == desc->myrank) ? desc->get_blkaddr( desc, ii, jj ) : NULL; - tile->ld = desc->get_blkldd( desc, ii ); + tile->format = CHAMELEON_TILE_FULLRANK; + tile->flttype = (int8_t)(desc->dtyp); + tile->rank = rank; + tile->m = ii == desc->lmt-1 ? desc->lm - ii * desc->mb : desc->mb; + tile->n = jj == desc->lnt-1 ? desc->ln - jj * desc->nb : desc->nb; + tile->mat = (rank == desc->myrank) ? desc->get_blkaddr( desc, ii, jj ) : NULL; + tile->ld = desc->get_blkldd( desc, ii ); #if defined(CHAMELEON_KERNELS_TRACE) chameleon_asprintf( &(tile->name), "%s(%d,%d)", desc->name, ii, jj ); #endif diff --git a/include/chameleon/struct.h b/include/chameleon/struct.h index 785185550..e5df8fa6d 100644 --- a/include/chameleon/struct.h +++ b/include/chameleon/struct.h @@ -4,7 +4,7 @@ * * @copyright 2009-2014 The University of Tennessee and The University of * Tennessee Research Foundation. All rights reserved. - * @copyright 2012-2022 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, + * @copyright 2012-2023 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, * Univ. Bordeaux. All rights reserved. * *** @@ -18,7 +18,7 @@ * @author Florent Pruvost * @author Samuel Thibault * @author Matthieu Kuhn - * @date 2022-02-22 + * @date 2022-12-13 * */ #ifndef _chameleon_struct_h_ @@ -42,6 +42,7 @@ typedef struct chameleon_tile_s { void *mat; int rank, m, n, ld; int8_t format; + int8_t flttype; } CHAM_tile_t; /** -- GitLab