Mentions légales du service

Skip to content
Snippets Groups Projects
codelet_zlascal.c 2.2 KiB
Newer Older
 * @file starpu/codelet_zlascal.c
Mathieu Faverge's avatar
Mathieu Faverge committed
 * @copyright 2009-2014 The University of Tennessee and The University of
 *                      Tennessee Research Foundation. All rights reserved.
PRUVOST Florent's avatar
PRUVOST Florent committed
 * @copyright 2012-2019 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
 *                      Univ. Bordeaux. All rights reserved.
 * @brief Chameleon zlascal StarPU codelet
PRUVOST Florent's avatar
PRUVOST Florent committed
 * @version 0.9.2
 * @comment This file has been automatically generated
PRUVOST Florent's avatar
PRUVOST Florent committed
 *          from Plasma 2.5.0 for CHAMELEON 0.9.2
 * @author Dalal Sukkari
BARROS DE ASSIS Lucas's avatar
BARROS DE ASSIS Lucas committed
 * @author Lucas Barros de Assis
PRUVOST Florent's avatar
PRUVOST Florent committed
 * @date 2016-11-30
 * @precisions normal z -> c d s
 *
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
#if !defined(CHAMELEON_SIMULATION)
static void cl_zlascal_cpu_func(void *descr[], void *cl_arg)
{
    cham_uplo_t uplo;
    int M;
    int N;
    CHAMELEON_Complex64_t alpha;
BARROS DE ASSIS Lucas's avatar
BARROS DE ASSIS Lucas committed

    starpu_codelet_unpack_args(cl_arg, &uplo, &M, &N, &alpha);
    return;
}
#endif /* !defined(CHAMELEON_SIMULATION) */

/*
 * Codelet definition
 */
CODELETS_CPU(zlascal, 1, cl_zlascal_cpu_func)

void INSERT_TASK_zlascal(const RUNTIME_option_t *options,
                        cham_uplo_t uplo,
                        int m, int n, int nb,
                        CHAMELEON_Complex64_t alpha,
{
    (void)nb;
    struct starpu_codelet *codelet = &cl_zlascal;
    void (*callback)(void*) = options->profiling ? cl_zlascal_callback : NULL;

    CHAMELEON_BEGIN_ACCESS_DECLARATION;
    CHAMELEON_ACCESS_RW(A, Am, An);
    CHAMELEON_END_ACCESS_DECLARATION;

    starpu_insert_task(
        starpu_mpi_codelet(codelet),
        STARPU_VALUE,    &uplo,              sizeof(int),
        STARPU_VALUE,    &m,                  sizeof(int),
        STARPU_VALUE,    &n,                  sizeof(int),
        STARPU_VALUE,    &alpha,              sizeof(CHAMELEON_Complex64_t),
        STARPU_RW,         RTBLKADDR(A, CHAMELEON_Complex64_t, Am, An),
        STARPU_PRIORITY,  options->priority,
        STARPU_CALLBACK,  callback,
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
        STARPU_NAME, "zlascal",