codelet_zlacpy.c 2.58 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 23 24 25 26 27 28 29 30 31 32 33 34 35
 *
 **/

/**
 * @file codelet_zlacpy.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
 *
 **/
#include "runtime/parsec/include/morse_parsec.h"

/***************************************************************************//**
 *
 * @ingroup CORE_MORSE_Complex64_t
 *
 **/
static int
CORE_zlacpy_parsec(dague_execution_unit_t *context, dague_execution_context_t * this_task)
{
    MORSE_enum *uplo;
    int *M;
    int *N;
Mathieu Faverge's avatar
Mathieu Faverge committed
36
    MORSE_Complex64_t *A;
Mathieu Faverge's avatar
Mathieu Faverge committed
37
    int *LDA;
Mathieu Faverge's avatar
Mathieu Faverge committed
38
    MORSE_Complex64_t *B;
Mathieu Faverge's avatar
Mathieu Faverge committed
39 40 41 42 43 44
    int *LDB;

    dague_dtd_unpack_args(this_task,
                          UNPACK_VALUE, &uplo,
                          UNPACK_VALUE, &M,
                          UNPACK_VALUE, &N,
Mathieu Faverge's avatar
Mathieu Faverge committed
45
                          UNPACK_DATA,  &A,
Mathieu Faverge's avatar
Mathieu Faverge committed
46
                          UNPACK_VALUE, &LDA,
Mathieu Faverge's avatar
Mathieu Faverge committed
47
                          UNPACK_DATA,  &B,
Mathieu Faverge's avatar
Mathieu Faverge committed
48 49 50 51 52 53 54 55 56
                          UNPACK_VALUE, &LDB
                        );


    CORE_zlacpy(*uplo, *M, *N, A, *LDA, B, *LDB);

    return 0;
}

57
void MORSE_TASK_zlacpy(const MORSE_option_t *options,
Mathieu Faverge's avatar
Mathieu Faverge committed
58
                       MORSE_enum uplo, int m, int n, int nb,
59 60
                       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
61 62 63 64 65 66 67 68 69 70 71 72 73 74
{

    dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);

    insert_task_generic_fptr(DAGUE_dtd_handle,      CORE_zlacpy_parsec,        "lacpy",
                             sizeof(MORSE_enum),    &uplo,                      VALUE,
                             sizeof(int),           &m,                         VALUE,
                             sizeof(int),           &n,                         VALUE,
                             PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),   INPUT | REGION_FULL,
                             sizeof(int),           &lda,                       VALUE,
                             PASSED_BY_REF,         RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ),   OUTPUT | REGION_FULL,
                             sizeof(int),           &ldb,                       VALUE,
                             0);
}