codelet_ztrsm.c 2.9 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_ztrsm.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

Mathieu Faverge's avatar
Mathieu Faverge committed
27 28 29
static inline int
CORE_ztrsm_parsec( parsec_execution_stream_t *context,
                    parsec_task_t             *this_task )
Mathieu Faverge's avatar
Mathieu Faverge committed
30 31 32 33
{
    MORSE_enum *side, *uplo, *trans, *diag;
    int  *tempmm, *nb, *ldak, *ldam;
    MORSE_Complex64_t *alpha;
Mathieu Faverge's avatar
Mathieu Faverge committed
34 35
    MORSE_Complex64_t *T;
    MORSE_Complex64_t *C;
Mathieu Faverge's avatar
Mathieu Faverge committed
36

Mathieu Faverge's avatar
Mathieu Faverge committed
37
    parsec_dtd_unpack_args(
38 39 40 41 42 43 44 45 46 47 48 49
        this_task,
        UNPACK_VALUE, &side,
        UNPACK_VALUE, &uplo,
        UNPACK_VALUE, &trans,
        UNPACK_VALUE, &diag,
        UNPACK_VALUE, &tempmm,
        UNPACK_VALUE, &nb,
        UNPACK_VALUE, &alpha,
        UNPACK_DATA,  &T,
        UNPACK_VALUE, &ldak,
        UNPACK_DATA,  &C,
        UNPACK_VALUE, &ldam );
Mathieu Faverge's avatar
Mathieu Faverge committed
50 51 52 53 54

    CORE_ztrsm(*side, *uplo, *trans, *diag,
           *tempmm, *nb, *alpha, T, *ldak,
           C, *ldam);

Mathieu Faverge's avatar
Mathieu Faverge committed
55
    (void)context;
Mathieu Faverge's avatar
Mathieu Faverge committed
56 57 58
    return 0;
}

59
void MORSE_TASK_ztrsm(const MORSE_option_t *options,
Mathieu Faverge's avatar
Mathieu Faverge committed
60 61
                      MORSE_enum side, MORSE_enum uplo, MORSE_enum transA, MORSE_enum diag,
                      int m, int n, int nb,
62 63
                      MORSE_Complex64_t alpha, const MORSE_desc_t *A, int Am, int An, int lda,
                      const MORSE_desc_t *B, int Bm, int Bn, int ldb)
Mathieu Faverge's avatar
Mathieu Faverge committed
64
{
Mathieu Faverge's avatar
Mathieu Faverge committed
65
    parsec_taskpool_t* PARSEC_dtd_taskpool = (parsec_taskpool_t *)(options->sequence->schedopt);
Mathieu Faverge's avatar
Mathieu Faverge committed
66

Mathieu Faverge's avatar
Mathieu Faverge committed
67 68
    parsec_dtd_taskpool_insert_task(
        PARSEC_dtd_taskpool, CORE_ztrsm_parsec, options->priority, "Trsm",
69 70 71 72 73 74 75
        sizeof(MORSE_enum),    &side,                     VALUE,
        sizeof(MORSE_enum),    &uplo,                     VALUE,
        sizeof(MORSE_enum),    &transA,                   VALUE,
        sizeof(MORSE_enum),    &diag,                     VALUE,
        sizeof(int),           &m,                        VALUE,
        sizeof(int),           &n,                        VALUE,
        sizeof(MORSE_Complex64_t),           &alpha,      VALUE,
76
        PASSED_BY_REF,     RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT | morse_parsec_get_arena_index(A),
77
        sizeof(int),           &lda,                      VALUE,
78
        PASSED_BY_REF,     RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),     INOUT | morse_parsec_get_arena_index(A) | AFFINITY,
79 80
        sizeof(int),           &ldb,                      VALUE,
        0);
81 82

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