From f2b82148afee9eca5c8647d5440387318d9943f6 Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Tue, 12 Oct 2021 12:17:48 +0200 Subject: [PATCH] CHAM_Tile: Add a function to print the tile type --- include/chameleon/struct.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/chameleon/struct.h b/include/chameleon/struct.h index a43e46d69..33f19584e 100644 --- a/include/chameleon/struct.h +++ b/include/chameleon/struct.h @@ -158,6 +158,20 @@ CHAM_tile_get_ptr( const CHAM_tile_t *tile ) return tile->mat; } +static inline const char * +CHAM_tile_get_typestr( const CHAM_tile_t *tile ) +{ + if ( tile->format & CHAMELEON_TILE_DESC ) { + return "Desc"; + } + + if ( tile->format & CHAMELEON_TILE_HMAT ) { + return "HMat"; + } + + return "Full"; +} + END_C_DECLS #endif /* _chameleon_struct_h_ */ -- GitLab