pzlag2c.c 1.64 KB
Newer Older
1
/**
2 3
 *
 * @file pzlag2c.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 zlag2c 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
 * @author Mathieu Faverge
 * @author Emmanuel Agullo
 * @author Cedric Castagnede
 * @date 2010-11-15
 * @precisions mixed zc -> ds
 *
23
 */
24
#include "control/common.h"
25 26 27 28 29

#define A(m,n) A,  m,  n
#define B(m,n) B,  m,  n
#define SA(m,n) SA,  m,  n
#define SB(m,n) SB,  m,  n
30
/**
31
 *
32 33
 */
/**
34
 *
35
 */
Mathieu Faverge's avatar
Mathieu Faverge committed
36
void chameleon_pclag2z(CHAM_desc_t *SA, CHAM_desc_t *B,
Mathieu Faverge's avatar
Mathieu Faverge committed
37
                          RUNTIME_sequence_t *sequence, RUNTIME_request_t *request)
38
{
Mathieu Faverge's avatar
Mathieu Faverge committed
39
    CHAM_context_t *chamctxt;
Mathieu Faverge's avatar
Mathieu Faverge committed
40
    RUNTIME_option_t options;
41 42 43 44 45

    int X, Y;
    int m, n;
    int ldam, ldbm;

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
    }
Mathieu Faverge's avatar
Mathieu Faverge committed
50
    RUNTIME_options_init(&options, chamctxt, sequence, request);
51 52 53 54 55 56 57

    for(m = 0; m < SA->mt; m++) {
        X = m == SA->mt-1 ? SA->m-m*SA->mb : SA->mb;
        ldam = BLKLDD(SA, m);
        ldbm = BLKLDD(B, m);
        for(n = 0; n < SA->nt; n++) {
            Y = n == SA->nt-1 ? SA->n-n*SA->nb : SA->nb;
Mathieu Faverge's avatar
Mathieu Faverge committed
58
            INSERT_TASK_clag2z(
59 60 61 62 63 64
                &options,
                X, Y, SA->mb,
                SA(m, n), ldam,
                B(m, n), ldbm);
        }
    }
Mathieu Faverge's avatar
Mathieu Faverge committed
65
    RUNTIME_options_finalize(&options, chamctxt);
66
}