Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6134c424 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

CHAM_tile_t: add a rank field to store the rank of the tile at initialization

parent bce319e4
No related branches found
No related tags found
1 merge request!340descriptor: Add a rank_of_init function to store the initial distribution, and...
...@@ -100,10 +100,11 @@ void chameleon_desc_init_tiles( CHAM_desc_t *desc ) ...@@ -100,10 +100,11 @@ void chameleon_desc_init_tiles( CHAM_desc_t *desc )
for( ii=0; ii<desc->lmt; ii++, tile++ ) { for( ii=0; ii<desc->lmt; ii++, tile++ ) {
int rank = desc->get_rankof( desc, ii, jj ); int rank = desc->get_rankof( desc, ii, jj );
tile->format = CHAMELEON_TILE_FULLRANK; tile->format = CHAMELEON_TILE_FULLRANK;
tile->m = ii == desc->lmt-1 ? desc->lm - ii * desc->mb : desc->mb; tile->rank = rank;
tile->n = jj == desc->lnt-1 ? desc->ln - jj * desc->nb : desc->nb; tile->m = ii == desc->lmt-1 ? desc->lm - ii * desc->mb : desc->mb;
tile->mat = (rank == desc->myrank) ? desc->get_blkaddr( desc, ii, jj ) : NULL; tile->n = jj == desc->lnt-1 ? desc->ln - jj * desc->nb : desc->nb;
tile->ld = desc->get_blkldd( desc, ii ); tile->mat = (rank == desc->myrank) ? desc->get_blkaddr( desc, ii, jj ) : NULL;
tile->ld = desc->get_blkldd( desc, ii );
#if defined(CHAMELEON_KERNELS_TRACE) #if defined(CHAMELEON_KERNELS_TRACE)
chameleon_asprintf( &(tile->name), "%s(%d,%d)", desc->name, ii, jj ); chameleon_asprintf( &(tile->name), "%s(%d,%d)", desc->name, ii, jj );
#endif #endif
......
...@@ -39,9 +39,9 @@ typedef struct chameleon_tile_s { ...@@ -39,9 +39,9 @@ typedef struct chameleon_tile_s {
#if defined(CHAMELEON_KERNELS_TRACE) #if defined(CHAMELEON_KERNELS_TRACE)
char *name; char *name;
#endif #endif
int8_t format;
int m, n, ld;
void *mat; void *mat;
int rank, m, n, ld;
int8_t format;
} CHAM_tile_t; } CHAM_tile_t;
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment