codelet_ztpmlqt.c 2.94 KB
Newer Older
Mathieu Faverge's avatar
Mathieu Faverge committed
1
/**
2
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
3
 * @file quark/codelet_ztpmlqt.c
Mathieu Faverge's avatar
Mathieu Faverge committed
4
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
5 6
 * @copyright 2009-2016 The University of Tennessee and The University of
 *                      Tennessee Research Foundation. All rights reserved.
Mathieu Faverge's avatar
Mathieu Faverge committed
7
 * @copyright 2012-2018 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8
 *                      Univ. Bordeaux. All rights reserved.
Mathieu Faverge's avatar
Mathieu Faverge committed
9
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
10
 ***
Mathieu Faverge's avatar
Mathieu Faverge committed
11
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
12
 * @brief Chameleon ztpmlqt Quark codelet
Mathieu Faverge's avatar
Mathieu Faverge committed
13
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
14
 * @version 1.0.0
Mathieu Faverge's avatar
Mathieu Faverge committed
15
 * @author Mathieu Faverge
16
 * @date 2018-11-08
Mathieu Faverge's avatar
Mathieu Faverge committed
17 18
 * @precisions normal z -> s d c
 *
19
 */
Mathieu Faverge's avatar
Mathieu Faverge committed
20
#include "chameleon_quark.h"
Mathieu Faverge's avatar
Mathieu Faverge committed
21
#include "chameleon/tasks_z.h"
Mathieu Faverge's avatar
Mathieu Faverge committed
22 23 24 25 26
#include "coreblas/coreblas_z.h"

static void
CORE_ztpmlqt_quark( Quark *quark )
{
Mathieu Faverge's avatar
Mathieu Faverge committed
27 28
    cham_side_t side;
    cham_trans_t trans;
Mathieu Faverge's avatar
Mathieu Faverge committed
29 30 31 32 33
    int M;
    int N;
    int K;
    int L;
    int ib;
Mathieu Faverge's avatar
Mathieu Faverge committed
34
    const CHAMELEON_Complex64_t *V;
Mathieu Faverge's avatar
Mathieu Faverge committed
35
    int ldv;
Mathieu Faverge's avatar
Mathieu Faverge committed
36
    const CHAMELEON_Complex64_t *T;
Mathieu Faverge's avatar
Mathieu Faverge committed
37
    int ldt;
Mathieu Faverge's avatar
Mathieu Faverge committed
38
    CHAMELEON_Complex64_t *A;
Mathieu Faverge's avatar
Mathieu Faverge committed
39
    int lda;
Mathieu Faverge's avatar
Mathieu Faverge committed
40
    CHAMELEON_Complex64_t *B;
Mathieu Faverge's avatar
Mathieu Faverge committed
41
    int ldb;
Mathieu Faverge's avatar
Mathieu Faverge committed
42
    CHAMELEON_Complex64_t *WORK;
Mathieu Faverge's avatar
Mathieu Faverge committed
43 44 45 46 47 48 49 50

    quark_unpack_args_16( quark, side, trans, M, N, K, L, ib,
                          V, ldv, T, ldt, A, lda, B, ldb, WORK );

    CORE_ztpmlqt( side, trans, M, N, K, L, ib,
                  V, ldv, T, ldt, A, lda, B, ldb, WORK );
}

Mathieu Faverge's avatar
Mathieu Faverge committed
51 52
void INSERT_TASK_ztpmlqt( const RUNTIME_option_t *options,
                         cham_side_t side, cham_trans_t trans,
Mathieu Faverge's avatar
Mathieu Faverge committed
53
                         int M, int N, int K, int L, int ib, int nb,
Mathieu Faverge's avatar
Mathieu Faverge committed
54 55 56 57
                         const CHAM_desc_t *V, int Vm, int Vn, int ldv,
                         const CHAM_desc_t *T, int Tm, int Tn, int ldt,
                         const CHAM_desc_t *A, int Am, int An, int lda,
                         const CHAM_desc_t *B, int Bm, int Bn, int ldb )
Mathieu Faverge's avatar
Mathieu Faverge committed
58 59
{
    quark_option_t *opt = (quark_option_t*)(options->schedopt);
60
    DAG_CORE_TPMLQRT;
Mathieu Faverge's avatar
Mathieu Faverge committed
61 62 63 64 65

    int shapeV = ( L == 0 ) ? 0 : (QUARK_REGION_L | QUARK_REGION_D);

    QUARK_Insert_Task(
        opt->quark, CORE_ztpmlqt_quark, (Quark_Task_Flags*)opt,
Mathieu Faverge's avatar
Mathieu Faverge committed
66 67
        sizeof(int),              &side,  VALUE,
        sizeof(int),              &trans, VALUE,
Mathieu Faverge's avatar
Mathieu Faverge committed
68 69 70 71 72
        sizeof(int),                     &M,     VALUE,
        sizeof(int),                     &N,     VALUE,
        sizeof(int),                     &K,     VALUE,
        sizeof(int),                     &L,     VALUE,
        sizeof(int),                     &ib,    VALUE,
Mathieu Faverge's avatar
Mathieu Faverge committed
73
        sizeof(CHAMELEON_Complex64_t)*nb*nb,  RTBLKADDR( V, CHAMELEON_Complex64_t, Vm, Vn ), INPUT | shapeV,
Mathieu Faverge's avatar
Mathieu Faverge committed
74
        sizeof(int),                     &ldv,   VALUE,
Mathieu Faverge's avatar
Mathieu Faverge committed
75
        sizeof(CHAMELEON_Complex64_t)*ib*nb,  RTBLKADDR( T, CHAMELEON_Complex64_t, Tm, Tn ), INPUT,
Mathieu Faverge's avatar
Mathieu Faverge committed
76
        sizeof(int),                     &ldt,   VALUE,
Mathieu Faverge's avatar
Mathieu Faverge committed
77
        sizeof(CHAMELEON_Complex64_t)*nb*nb,  RTBLKADDR( A, CHAMELEON_Complex64_t, Am, An ), INOUT,
Mathieu Faverge's avatar
Mathieu Faverge committed
78
        sizeof(int),                     &lda,   VALUE,
Mathieu Faverge's avatar
Mathieu Faverge committed
79
        sizeof(CHAMELEON_Complex64_t)*nb*nb,  RTBLKADDR( B, CHAMELEON_Complex64_t, Bm, Bn ), INOUT | LOCALITY,
Mathieu Faverge's avatar
Mathieu Faverge committed
80
        sizeof(int),                     &ldb,   VALUE,
Mathieu Faverge's avatar
Mathieu Faverge committed
81
        sizeof(CHAMELEON_Complex64_t)*ib*nb,  NULL, SCRATCH,
Mathieu Faverge's avatar
Mathieu Faverge committed
82 83
        0);
}