Commit e8a37d5c authored by Mathieu Faverge's avatar Mathieu Faverge

Add map codelets for quark and parsec

parent e6bcc55e
......@@ -101,6 +101,7 @@ precisions_rules_py(RUNTIME_SRCS_GENERATED "${ZSRC}"
set(RUNTIME_SRCS
${RUNTIME_COMMON}
${RUNTIME_SRCS_GENERATED}
codelets/codelet_map.c
)
# Force generation of sources
......
/**
*
* @file codelet_map.c
*
* @copyright 2018-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Chameleon map PaRSEC codelet
*
* @version 1.0.0
* @author Mathieu Faverge
* @date 2018-09-24
*
*/
#include "chameleon_parsec.h"
#include "chameleon/tasks.h"
static inline int
CORE_map_parsec( parsec_execution_stream_t *context,
parsec_task_t *this_task )
{
const CHAM_desc_t *desc;
cham_uplo_t uplo;
int m;
int n;
void *data;
cham_unary_operator_t operator;
void *op_args;
quark_unpack_args_9( this_task, desc, uplo, m, n, data, operator, op_args );
operator( desc, uplo, m, n, data, op_args );
(void)context;
return PARSEC_HOOK_RETURN_DONE;
}
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 )
{
parsec_taskpool_t* PARSEC_dtd_taskpool = (parsec_taskpool_t *)(options->sequence->schedopt);
parsec_dtd_taskpool_insert_task(
PARSEC_dtd_taskpool, CORE_map_parsec, options->priority, "map",
sizeof(CHAM_desc_t*), &A, VALUE,
sizeof(cham_uplo_t), &uplo, VALUE,
sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE,
PASSED_BY_REF, RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An), chameleon_parsec_get_arena_index( A ) | INOUT,
sizeof(cham_unary_operator_t), &operator, VALUE,
sizeof(void*), &op_args, VALUE,
PARSEC_DTD_ARG_END );
}
......@@ -102,6 +102,7 @@ precisions_rules_py(RUNTIME_SRCS_GENERATED "${ZSRC}"
set(RUNTIME_SRCS
${RUNTIME_COMMON}
${RUNTIME_SRCS_GENERATED}
codelets/codelet_map.c
)
# Force generation of sources
......
/**
*
* @file codelet_map.c
*
* @copyright 2018-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
* @brief Chameleon map Quark codelet
*
* @version 1.0.0
* @author Mathieu Faverge
* @date 2018-09-24
*
*/
#include "chameleon_quark.h"
#include "chameleon/tasks.h"
void CORE_map_quark(Quark *quark)
{
const CHAM_desc_t *desc;
cham_uplo_t uplo;
int m;
int n;
void *data;
cham_unary_operator_t operator;
void *op_args;
quark_unpack_args_7( quark, desc, uplo, m, n, data, operator, op_args );
operator( 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 )
{
quark_option_t *opt = (quark_option_t*)(options->schedopt);
QUARK_Insert_Task(opt->quark, CORE_map_quark, (Quark_Task_Flags*)opt,
sizeof(CHAM_desc_t*), &A, VALUE,
sizeof(cham_uplo_t), &uplo, VALUE,
sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE,
sizeof(CHAMELEON_Complex64_t), RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An), INOUT,
sizeof(cham_unary_operator_t), &operator, VALUE,
sizeof(void*), &op_args, VALUE,
0);
}
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