codelet_zlauum.c 2.3 KB
Newer Older
1 2
/**
 *
3 4
 * @copyright (c) 2009-2014 The University of Tennessee and The University
 *                          of Tennessee Research Foundation.
5
 *                          All rights reserved.
6
 * @copyright (c) 2012-2016 Inria. All rights reserved.
7
 * @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
 *
 **/

/**
 *
 * @file codelet_zlauum.c
 *
 *  MORSE codelets kernel
 *  MORSE is a software package provided by Univ. of Tennessee,
 *  Univ. of California Berkeley and Univ. of Colorado Denver
 *
 * @version 2.5.0
 * @comment This file has been automatically generated
 *          from Plasma 2.5.0 for MORSE 1.0.0
 * @author Julien Langou
 * @author Henricus Bouwmeester
 * @author Mathieu Faverge
 * @author Emmanuel Agullo
 * @author Cedric Castagnede
 * @date 2010-11-15
 * @precisions normal z -> c d s
 *
 **/
31 32
#include "chameleon_starpu.h"
#include "runtime_codelet_z.h"
33 34 35 36 37 38 39

/**
 *
 * @ingroup CORE_MORSE_Complex64_t
 *
 **/

40
void MORSE_TASK_zlauum(const MORSE_option_t *options,
41
                       MORSE_enum uplo, int n, int nb,
42
                       const MORSE_desc_t *A, int Am, int An, int lda)
43 44 45 46 47
{
    (void)nb;
    struct starpu_codelet *codelet = &cl_zlauum;
    void (*callback)(void*) = options->profiling ? cl_zlauum_callback : NULL;

THIBAULT Samuel's avatar
THIBAULT Samuel committed
48 49 50 51 52 53 54 55 56 57 58 59
    MORSE_BEGIN_ACCESS_DECLARATION;
    MORSE_ACCESS_RW(A, Am, An);
    MORSE_END_ACCESS_DECLARATION;

    starpu_insert_task(
        starpu_mpi_codelet(codelet),
        STARPU_VALUE,    &uplo,              sizeof(MORSE_enum),
        STARPU_VALUE,    &n,                 sizeof(int),
        STARPU_RW,        RTBLKADDR(A, MORSE_Complex64_t, Am, An),
        STARPU_VALUE,    &lda,               sizeof(int),
        STARPU_PRIORITY,  options->priority,
        STARPU_CALLBACK,  callback,
60
#if defined(CHAMELEON_CODELETS_HAVE_NAME)
THIBAULT Samuel's avatar
THIBAULT Samuel committed
61
        STARPU_NAME, "zlauum",
62
#endif
THIBAULT Samuel's avatar
THIBAULT Samuel committed
63
        0);
64 65 66
}


67
#if !defined(CHAMELEON_SIMULATION)
68 69 70 71 72 73 74 75 76
static void cl_zlauum_cpu_func(void *descr[], void *cl_arg)
{
    MORSE_enum uplo;
    int N;
    MORSE_Complex64_t *A;
    int LDA;

    A = (MORSE_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]);
    starpu_codelet_unpack_args(cl_arg, &uplo, &N, &LDA);
77
    CORE_zlauum(uplo, N, A, LDA);
78
}
79
#endif /* !defined(CHAMELEON_SIMULATION) */
80 81 82 83 84

/*
 * Codelet definition
 */
CODELETS_CPU(zlauum, 1, cl_zlauum_cpu_func)