Une nouvelle version du portail de gestion des comptes externes sera mise en production lundi 09 août. Elle permettra d'allonger la validité d'un compte externe jusqu'à 3 ans. Pour plus de détails sur cette version consulter : https://doc-si.inria.fr/x/FCeS

pztrsmpl.c 2.74 KB
Newer Older
1
/**
2 3
 *
 * @file pztrsmpl.c
4
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
5 6
 * @copyright 2009-2014 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.
9
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
10
 ***
11
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
12
 * @brief Chameleon ztrsmpl parallel algorithm
13
 *
Mathieu Faverge's avatar
Mathieu Faverge committed
14
 * @version 1.0.0
15
 * @comment This file has been automatically generated
Mathieu Faverge's avatar
Mathieu Faverge committed
16
 *          from Plasma 2.5.0 for CHAMELEON 1.0.0
17 18 19 20 21 22 23 24
 * @author Jakub Kurzak
 * @author Hatem Ltaief
 * @author Mathieu Faverge
 * @author Emmanuel Agullo
 * @author Cedric Castagnede
 * @date 2010-11-15
 * @precisions normal z -> s d c
 *
25
 */
26
#include "control/common.h"
27 28 29 30 31

#define A(m,n) A,  m,  n
#define B(m,n) B,  m,  n
#define L(m,n) L,  m,  n
#define IPIV(m,n) &(IPIV[(int64_t)A->nb*((int64_t)(m)+(int64_t)A->mt*(int64_t)(n))])
32
/**
33
 *  Parallel forward substitution for tile LU - dynamic scheduling
34
 */
Mathieu Faverge's avatar
Mathieu Faverge committed
35
void chameleon_pztrsmpl( CHAM_desc_t *A, CHAM_desc_t *B, CHAM_desc_t *L, int *IPIV,
Mathieu Faverge's avatar
Mathieu Faverge committed
36
                     RUNTIME_sequence_t *sequence, RUNTIME_request_t *request )
37
{
Mathieu Faverge's avatar
Mathieu Faverge committed
38
    CHAM_context_t *chamctxt;
Mathieu Faverge's avatar
Mathieu Faverge committed
39
    RUNTIME_option_t options;
40 41 42 43 44 45

    int k, m, n;
    int ldak, ldam, ldbk, ldbm;
    int tempkm, tempnn, tempkmin, tempmm, tempkn;
    int ib;

Mathieu Faverge's avatar
Mathieu Faverge committed
46
    chamctxt = chameleon_context_self();
Mathieu Faverge's avatar
Mathieu Faverge committed
47
    if (sequence->status != CHAMELEON_SUCCESS)
48
        return;
Mathieu Faverge's avatar
Mathieu Faverge committed
49
    RUNTIME_options_init(&options, chamctxt, sequence, request);
50

Mathieu Faverge's avatar
Mathieu Faverge committed
51
    ib = CHAMELEON_IB;
52
    for (k = 0; k < chameleon_min(A->mt, A->nt); k++) {
53 54
        tempkm   = k == A->mt-1 ? A->m-k*A->mb : A->mb;
        tempkn   = k == A->nt-1 ? A->n-k*A->nb : A->nb;
55
        tempkmin = k == chameleon_min(A->mt, A->nt)-1 ? chameleon_min(A->m, A->n)-k*A->mb : A->mb;
56 57 58 59
        ldak = BLKLDD(A, k);
        ldbk = BLKLDD(B, k);
        for (n = 0; n < B->nt; n++) {
            tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
Mathieu Faverge's avatar
Mathieu Faverge committed
60
            INSERT_TASK_zgessm(
61 62 63 64 65 66 67 68 69 70 71 72 73
                &options,
                tempkm, tempnn, tempkmin, ib, L->nb,
                IPIV(k, k),
                L(k, k), L->mb,
                A(k, k), ldak,
                B(k, n), ldbk);
        }
        for (m = k+1; m < A->mt; m++) {
            tempmm = m == A->mt-1 ? A->m-m*A->mb : A->mb;
            ldam = BLKLDD(A, m);
            ldbm = BLKLDD(B, m);
            for (n = 0; n < B->nt; n++) {
                tempnn  = n == B->nt-1 ? B->n-n*B->nb : B->nb;
Mathieu Faverge's avatar
Mathieu Faverge committed
74
                INSERT_TASK_zssssm(
75 76 77 78 79 80 81 82 83 84
                    &options,
                    A->nb, tempnn, tempmm, tempnn, tempkn, ib, L->nb,
                    B(k, n), ldbk,
                    B(m, n), ldbm,
                    L(m, k), L->mb,
                    A(m, k), ldam,
                    IPIV(m, k));
            }
        }
    }
Mathieu Faverge's avatar
Mathieu Faverge committed
85
    RUNTIME_options_finalize(&options, chamctxt);
86
}