Mentions légales du service

Skip to content
Snippets Groups Projects
codelet_zlansy.c 2.47 KiB
/**
 *
 * @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.
 * @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
 *
 **/

/**
 * @file codelet_zlansy.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"

static int
CORE_zlansy_parsec(dague_execution_unit_t *context, dague_execution_context_t *this_task)
{
    int *norm;
    MORSE_enum *uplo;
    int *N;
    MORSE_Complex64_t *A;
    int *LDA;
    double *work;
    double *normA;

    dague_dtd_unpack_args(this_task,
                          UNPACK_VALUE, &norm,
                          UNPACK_VALUE, &uplo,
                          UNPACK_VALUE, &N,
                          UNPACK_DATA,  &A,
                          UNPACK_VALUE, &LDA,
                          UNPACK_SCRATCH, &work,
                          UNPACK_DATA,  &normA
                        );


    CORE_zlansy( *norm, *uplo, *N, A, *LDA, work, normA);

    return 0;
}

void MORSE_TASK_zlansy(const MORSE_option_t *options,
                       MORSE_enum norm, MORSE_enum uplo, int N, int NB,
                       const MORSE_desc_t *A, int Am, int An, int LDA,
                       const MORSE_desc_t *B, int Bm, int Bn)
{
    dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);

    int szeW = max( 1, N );

    dague_insert_task(DAGUE_dtd_handle,      CORE_zlansy_parsec,    "lansy",
                             sizeof(MORSE_enum),            &norm,          VALUE,
                             sizeof(MORSE_enum),            &uplo,          VALUE,
                             sizeof(int),                   &N,             VALUE,
                             PASSED_BY_REF,         RTBLKADDR( A, MORSE_Complex64_t, Am, An ),     INPUT | REGION_FULL,
                             sizeof(int),                   &LDA,           VALUE,
                             sizeof(double)*szeW,           NULL,           SCRATCH,
                             PASSED_BY_REF,         RTBLKADDR( B, double, Bm, Bn ),     OUTPUT | REGION_FULL,
                             0);
}