Commit ecdd07f1 authored by Mathieu Faverge's avatar Mathieu Faverge

Replace all occurences of operator variable by op_fct to avoid conflict with...

Replace all occurences of operator variable by op_fct to avoid conflict with the c++ operator keyword
parent 9e918408
......@@ -35,7 +35,7 @@
* @param[in,out] A
* On exit, the operator has been applied on each tile of the matrix A.
*
* @param[in] operator
* @param[in] op_fct
* The operator function to apply on each tile of the matrix.
*
* @param[in,out] op_args
......@@ -53,7 +53,7 @@
*/
int CHAMELEON_map_Tile( cham_uplo_t uplo,
CHAM_desc_t *A,
cham_unary_operator_t operator,
cham_unary_operator_t op_fct,
void *op_args )
{
CHAM_context_t *chamctxt;
......@@ -68,7 +68,7 @@ int CHAMELEON_map_Tile( cham_uplo_t uplo,
}
chameleon_sequence_create( chamctxt, &sequence );
CHAMELEON_map_Tile_Async( uplo, A, operator, op_args, sequence, &request );
CHAMELEON_map_Tile_Async( uplo, A, op_fct, op_args, sequence, &request );
CHAMELEON_Desc_Flush( A, sequence );
......@@ -107,7 +107,7 @@ int CHAMELEON_map_Tile( cham_uplo_t uplo,
*/
int CHAMELEON_map_Tile_Async( cham_uplo_t uplo,
CHAM_desc_t *A,
cham_unary_operator_t operator,
cham_unary_operator_t op_fct,
void *op_args,
RUNTIME_sequence_t *sequence,
RUNTIME_request_t *request )
......@@ -146,7 +146,7 @@ int CHAMELEON_map_Tile_Async( cham_uplo_t uplo,
return CHAMELEON_SUCCESS;
}
chameleon_pmap( uplo, A, operator, op_args, sequence, request );
chameleon_pmap( uplo, A, op_fct, op_args, sequence, request );
return CHAMELEON_SUCCESS;
}
......@@ -21,7 +21,7 @@
* chameleon_pmap - Generate a random matrix by tiles.
*/
void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
cham_unary_operator_t operator, void *op_args,
cham_unary_operator_t op_fct, void *op_args,
RUNTIME_sequence_t *sequence, RUNTIME_request_t *request )
{
CHAM_context_t *chamctxt;
......@@ -40,12 +40,12 @@ void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
INSERT_TASK_map(
&options,
ChamUpperLower, A(m, n),
operator, op_args );
op_fct, op_args );
}
INSERT_TASK_map(
&options,
uplo, A(n, n),
operator, op_args );
op_fct, op_args );
}
break;
......@@ -54,12 +54,12 @@ void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
INSERT_TASK_map(
&options,
uplo, A(n, n),
operator, op_args );
op_fct, op_args );
for (m = n+1; m < A->mt; m++) {
INSERT_TASK_map(
&options,
ChamUpperLower, A(m, n),
operator, op_args );
op_fct, op_args );
}
}
break;
......@@ -71,7 +71,7 @@ void chameleon_pmap( cham_uplo_t uplo, CHAM_desc_t *A,
INSERT_TASK_map(
&options,
uplo, A(m, n),
operator, op_args );
op_fct, op_args );
}
}
}
......
......@@ -18,13 +18,13 @@
void INSERT_TASK_map( const RUNTIME_option_t *options,
cham_uplo_t uplo, const CHAM_desc_t *A, int Am, int An,
cham_unary_operator_t operator, void *op_args )
cham_unary_operator_t op_fct, void *op_args )
{
char *ptrA = RTBLKADDR( A, char, Am, An );
#pragma omp task depend(inout: ptrA[0])
{
operator( A, uplo, Am, An, ptrA, op_args );
op_fct( A, uplo, Am, An, ptrA, op_args );
}
}
......@@ -26,12 +26,12 @@ CORE_map_parsec( parsec_execution_stream_t *context,
int m;
int n;
void *data;
cham_unary_operator_t operator;
cham_unary_operator_t op_fct;
void *op_args;
parsec_dtd_unpack_args(
this_task, &desc, &uplo, &m, &n, &data, &operator, &op_args );
operator( desc, uplo, m, n, data, op_args );
this_task, &desc, &uplo, &m, &n, &data, &op_fct, &op_args );
op_fct( desc, uplo, m, n, data, op_args );
(void)context;
return PARSEC_HOOK_RETURN_DONE;
......@@ -39,7 +39,7 @@ CORE_map_parsec( parsec_execution_stream_t *context,
void INSERT_TASK_map( const RUNTIME_option_t *options,
cham_uplo_t uplo, const CHAM_desc_t *A, int Am, int An,
cham_unary_operator_t operator, void *op_args )
cham_unary_operator_t op_fct, void *op_args )
{
parsec_taskpool_t* PARSEC_dtd_taskpool = (parsec_taskpool_t *)(options->sequence->schedopt);
......@@ -50,7 +50,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
sizeof(int), &Am, VALUE,
sizeof(int), &An, VALUE,
PASSED_BY_REF, RTBLKADDR(A, void, Am, An), chameleon_parsec_get_arena_index( A ) | INOUT,
sizeof(cham_unary_operator_t), &operator, VALUE,
sizeof(void*), &op_args, VALUE,
sizeof(cham_unary_operator_t), &op_fct, VALUE,
sizeof(void*), &op_args, VALUE,
PARSEC_DTD_ARG_END );
}
......@@ -24,16 +24,16 @@ void CORE_map_quark(Quark *quark)
int m;
int n;
void *data;
cham_unary_operator_t operator;
cham_unary_operator_t op_fct;
void *op_args;
quark_unpack_args_7( quark, desc, uplo, m, n, data, operator, op_args );
operator( desc, uplo, m, n, data, op_args );
quark_unpack_args_7( quark, desc, uplo, m, n, data, op_fct, op_args );
op_fct( desc, uplo, m, n, data, op_args );
}
void INSERT_TASK_map( const RUNTIME_option_t *options,
cham_uplo_t uplo, const CHAM_desc_t *A, int Am, int An,
cham_unary_operator_t operator, void *op_args )
cham_unary_operator_t op_fct, void *op_args )
{
quark_option_t *opt = (quark_option_t*)(options->schedopt);
......@@ -44,7 +44,7 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
sizeof(int), &Am, VALUE,
sizeof(int), &An, VALUE,
sizeof(char), RTBLKADDR(A, void, Am, An), INOUT,
sizeof(cham_unary_operator_t), &operator, VALUE,
sizeof(void*), &op_args, VALUE,
sizeof(cham_unary_operator_t), &op_fct, VALUE,
sizeof(void*), &op_args, VALUE,
0);
}
......@@ -27,12 +27,12 @@ static void cl_map_cpu_func(void *descr[], void *cl_arg)
int m;
int n;
void *data;
cham_unary_operator_t operator;
cham_unary_operator_t op_fct;
void *op_args;
data = (void *)STARPU_MATRIX_GET_PTR(descr[0]);
starpu_codelet_unpack_args(cl_arg, &desc, &uplo, &m, &n, &operator, &op_args );
operator( desc, uplo, m, n, data, op_args );
starpu_codelet_unpack_args(cl_arg, &desc, &uplo, &m, &n, &op_fct, &op_args );
op_fct( desc, uplo, m, n, data, op_args );
}
#endif /* !defined(CHAMELEON_SIMULATION) */
......@@ -43,7 +43,7 @@ CODELETS_CPU(map, 1, cl_map_cpu_func)
void INSERT_TASK_map( const RUNTIME_option_t *options,
cham_uplo_t uplo, const CHAM_desc_t *A, int Am, int An,
cham_unary_operator_t operator, void *op_args )
cham_unary_operator_t op_fct, void *op_args )
{
struct starpu_codelet *codelet = &cl_map;
......@@ -60,8 +60,8 @@ void INSERT_TASK_map( const RUNTIME_option_t *options,
STARPU_VALUE, &Am, sizeof(int),
STARPU_VALUE, &An, sizeof(int),
STARPU_RW, RTBLKADDR(A, void, Am, An),
STARPU_VALUE, &operator, sizeof(cham_unary_operator_t),
STARPU_VALUE, &op_args, sizeof(void*),
STARPU_VALUE, &op_fct, sizeof(cham_unary_operator_t),
STARPU_VALUE, &op_args, sizeof(void*),
STARPU_PRIORITY, options->priority,
STARPU_CALLBACK, callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment