codelet_zpotrf.c 2.19 KB
Newer Older
Mathieu Faverge's avatar
Mathieu Faverge committed
1 2 3 4 5 6
/**
 *
 * @copyright (c) 2009-2015 The University of Tennessee and The University
 *                          of Tennessee Research Foundation.
 *                          All rights reserved.
 * @copyright (c) 2012-2015 Inria. All rights reserved.
7
 * @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
Mathieu Faverge's avatar
Mathieu Faverge committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
 *
 **/

/**
 * @file codelet_zpotrf.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
 * @author Reazul Hoque
 * @precisions normal z -> c d s
 *
 **/
23 24
#include "chameleon_parsec.h"
#include "chameleon/morse_tasks_z.h"
25
#include "coreblas/coreblas_z.h"
Mathieu Faverge's avatar
Mathieu Faverge committed
26 27 28 29 30 31

/***************************************************************************//**
 *
 * @ingroup CORE_MORSE_Complex64_t
 *
 **/
Mathieu Faverge's avatar
Mathieu Faverge committed
32 33 34
static inline int
CORE_zpotrf_parsec( parsec_execution_stream_t *context,
                    parsec_task_t             *this_task )
Mathieu Faverge's avatar
Mathieu Faverge committed
35 36 37
{
    MORSE_enum *uplo;
    int *tempkm, *ldak, *iinfo;
Mathieu Faverge's avatar
Mathieu Faverge committed
38
    MORSE_Complex64_t *A;
Mathieu Faverge's avatar
Mathieu Faverge committed
39

Mathieu Faverge's avatar
Mathieu Faverge committed
40
    parsec_dtd_unpack_args(
41 42 43 44 45 46
        this_task,
        UNPACK_VALUE, &uplo,
        UNPACK_VALUE, &tempkm,
        UNPACK_DATA,  &A,
        UNPACK_VALUE, &ldak,
        UNPACK_VALUE, &iinfo );
Mathieu Faverge's avatar
Mathieu Faverge committed
47

Mathieu Faverge's avatar
Mathieu Faverge committed
48
    CORE_zpotrf(*uplo, *tempkm, A, *ldak, iinfo);
Mathieu Faverge's avatar
Mathieu Faverge committed
49

Mathieu Faverge's avatar
Mathieu Faverge committed
50
    (void)context;
Mathieu Faverge's avatar
Mathieu Faverge committed
51 52 53
    return 0;
}

54
void MORSE_TASK_zpotrf(const MORSE_option_t *options,
Mathieu Faverge's avatar
Mathieu Faverge committed
55
                       MORSE_enum uplo, int n, int nb,
56
                       const MORSE_desc_t *A, int Am, int An, int lda,
Mathieu Faverge's avatar
Mathieu Faverge committed
57 58
                       int iinfo)
{
Mathieu Faverge's avatar
Mathieu Faverge committed
59
    parsec_taskpool_t* PARSEC_dtd_taskpool = (parsec_taskpool_t *)(options->sequence->schedopt);
Mathieu Faverge's avatar
Mathieu Faverge committed
60

Mathieu Faverge's avatar
Mathieu Faverge committed
61 62
    parsec_dtd_taskpool_insert_task(
        PARSEC_dtd_taskpool, CORE_zpotrf_parsec, options->priority, "potrf",
63 64
        sizeof(MORSE_enum),    &uplo,                             VALUE,
        sizeof(int),           &n,                                VALUE,
65
        PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INOUT | morse_parsec_get_arena_index(A) | AFFINITY,
66 67 68
        sizeof(int),           &lda,                              VALUE,
        sizeof(int),           &iinfo,                            VALUE,
        0);
69 70

    (void)nb;
Mathieu Faverge's avatar
Mathieu Faverge committed
71
}