Mentions légales du service

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

map: Add the access parameter to the user level interface

parent 7689ae41
No related branches found
No related tags found
1 merge request!392Map Function: Add an access parameter to be able to generate data out of this function.
......@@ -27,7 +27,16 @@
*
*******************************************************************************
*
* @param[in,out] uplo
* @param[in] access
* - ChamR: A is accessed in read-only mode.
* - ChamW: A is accessed in write-only mode.
* WARNING: if the descriptor is set for allocation on the fly, the
* flush call included in this synchronous API will free all allocated
* data, prefer asynchronous call if you want to initialiaze data
* before submitting another algorithm.
* - ChamRW: A is accessed in read-write mode.
*
* @param[in] uplo
* - ChamUpper: Only the upper triangular part of the matrix is touched
* - ChamLower: Only the lower triangular part of the matrix is touched
* - ChamUpperLower: The entire the matrix is touched
......@@ -51,7 +60,8 @@
* @sa CHAMELEON_map_Tile_Async
*
*/
int CHAMELEON_map_Tile( cham_uplo_t uplo,
int CHAMELEON_map_Tile( cham_access_t access,
cham_uplo_t uplo,
CHAM_desc_t *A,
cham_unary_operator_t op_fct,
void *op_args )
......@@ -68,7 +78,7 @@ int CHAMELEON_map_Tile( cham_uplo_t uplo,
}
chameleon_sequence_create( chamctxt, &sequence );
CHAMELEON_map_Tile_Async( uplo, A, op_fct, op_args, sequence, &request );
CHAMELEON_map_Tile_Async( access, uplo, A, op_fct, op_args, sequence, &request );
CHAMELEON_Desc_Flush( A, sequence );
......@@ -89,6 +99,13 @@ int CHAMELEON_map_Tile( cham_uplo_t uplo,
*
*******************************************************************************
*
* @param[in] access
* - ChamR: A is accessed in read-only mode.
* - ChamW: A is accessed in write-only mode.
* INFO: tile of A can be unallocated before the call if the
* descriptor is set for allocation on the fly.
* - ChamRW: A is accessed in read-write mode.
*
* @param[in] sequence
* Identifies the sequence of function calls that this call belongs to
* (for completion checks and exception handling purposes).
......@@ -105,7 +122,8 @@ int CHAMELEON_map_Tile( cham_uplo_t uplo,
* @sa CHAMELEON_map_Tile
*
*/
int CHAMELEON_map_Tile_Async( cham_uplo_t uplo,
int CHAMELEON_map_Tile_Async( cham_access_t access,
cham_uplo_t uplo,
CHAM_desc_t *A,
cham_unary_operator_t op_fct,
void *op_args,
......@@ -146,7 +164,7 @@ int CHAMELEON_map_Tile_Async( cham_uplo_t uplo,
return CHAMELEON_SUCCESS;
}
chameleon_pmap( uplo, A, op_fct, op_args, sequence, request );
chameleon_pmap( access, uplo, A, op_fct, op_args, sequence, request );
return CHAMELEON_SUCCESS;
}
......@@ -20,7 +20,7 @@
/**
* chameleon_pmap - Generate a random matrix by tiles.
*/
void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
void chameleon_pmap( cham_access_t access, cham_uplo_t uplo, CHAM_desc_t *A,
cham_unary_operator_t op_fct, void *op_args,
RUNTIME_sequence_t *sequence, RUNTIME_request_t *request )
{
......@@ -39,12 +39,12 @@ void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
for (m = 0; m < n; m++) {
INSERT_TASK_map(
&options,
ChamRW, ChamUpperLower, A(m, n),
access, ChamUpperLower, A(m, n),
op_fct, op_args );
}
INSERT_TASK_map(
&options,
ChamRW, uplo, A(n, n),
access, uplo, A(n, n),
op_fct, op_args );
}
break;
......@@ -53,12 +53,12 @@ void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
for (n = 0; n < A->nt; n++) {
INSERT_TASK_map(
&options,
ChamRW, uplo, A(n, n),
access, uplo, A(n, n),
op_fct, op_args );
for (m = n+1; m < A->mt; m++) {
INSERT_TASK_map(
&options,
ChamRW, ChamUpperLower, A(m, n),
access, ChamUpperLower, A(m, n),
op_fct, op_args );
}
}
......@@ -70,7 +70,7 @@ void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
for (n = 0; n < A->nt; n++) {
INSERT_TASK_map(
&options,
ChamRW, uplo, A(m, n),
access, uplo, A(m, n),
op_fct, op_args );
}
}
......
......@@ -152,7 +152,7 @@ int CHAMELEON_zprint( FILE *file, const char *header,
/* Call the tile interface */
zprint_runtime_id = chamctxt->scheduler;
chameleon_pmap( uplo, &descAt, zprint, &options, sequence, &request );
chameleon_pmap( ChamR, uplo, &descAt, zprint, &options, sequence, &request );
/* Submit the matrix conversion back */
chameleon_ztile2lap( chamctxt, &descAl, &descAt,
......@@ -216,7 +216,7 @@ int CHAMELEON_zprint_Tile( FILE *file, const char *header,
chameleon_sequence_create( chamctxt, &sequence );
zprint_runtime_id = chamctxt->scheduler;
chameleon_pmap( uplo, A, zprint, &options, sequence, &request );
chameleon_pmap( ChamR, uplo, A, zprint, &options, sequence, &request );
CHAMELEON_Desc_Flush( A, sequence );
chameleon_sequence_wait( chamctxt, sequence );
......
......@@ -102,7 +102,7 @@ extern char *chameleon_lapack_constants[];
extern "C" {
#endif
void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
void chameleon_pmap( cham_access_t access, cham_uplo_t uplo, CHAM_desc_t *A,
cham_unary_operator_t operator, void *op_args,
RUNTIME_sequence_t *sequence, RUNTIME_request_t *request );
......
......@@ -74,11 +74,13 @@ BEGIN_C_DECLS
/* ****************************************************************************
* CHAMELEON functionnalities
*/
int CHAMELEON_map_Tile( cham_uplo_t uplo,
int CHAMELEON_map_Tile( cham_access_t access,
cham_uplo_t uplo,
CHAM_desc_t *A,
cham_unary_operator_t op_fct,
void *op_args );
int CHAMELEON_map_Tile_Async( cham_uplo_t uplo,
int CHAMELEON_map_Tile_Async( cham_access_t access,
cham_uplo_t uplo,
CHAM_desc_t *A,
cham_unary_operator_t op_fct,
void *op_args,
......
Subproject commit 906d73c7abb0821e8df787f05fab2d503a2e76ff
Subproject commit a0056374bf0163ba878d842cbc81999fece362b4
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