time_zheevd_tile.c 1.52 KB
Newer Older
1 2 3 4 5 6 7 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 36
/**
 *
 * @copyright (c) 2009-2014 The University of Tennessee and The University
 *                          of Tennessee Research Foundation.
 *                          All rights reserved.
 * @copyright (c) 2012-2014 Inria. All rights reserved.
 * @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
 *
 **/

/**
 *
 * @precisions normal z -> c d s
 *
 **/
#define _TYPE  MORSE_Complex64_t
#define _PREC  double
#define _LAMCH LAPACKE_dlamch_work

#define _NAME  "PLASMA_zheevd_Tile"
/* See Lawn 41 page 120 */
#define _FMULS ((2. / 3.) * ((double)N * (double)N * (double)N))
#define _FADDS ((2. / 3.) * ((double)N * (double)N * (double)N))

#include "./timing.c"
/* #include <mkl_service.h> */

static int
RunTest(int *iparam, double *dparam, morse_time_t *t_)
{
    PASTE_CODE_IPARAM_LOCALS( iparam );
    MORSE_desc_t *descT;
    int uplo = MorseLower;
    int vec  = MorseVec;
    int INFO;

37
    LDA = chameleon_max(LDA, N);
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

    /* Allocate Data */
    PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N);
    PASTE_CODE_ALLOCATE_MATRIX( S, 1, double, N, 1 );

    /* Allocate Workspace */
    MORSE_zplghe( (double)N, MorseUpperLower, N, A, LDA, 51 );
    MORSE_Alloc_Workspace_zheevd(N, N, &descT, 1, 1);

    START_TIMING();
    INFO = MORSE_zheevd(vec, uplo, N, A, LDA, S, descT);
    STOP_TIMING();

    if (INFO != 0){
        printf(" ERROR OCCURED INFO %d\n", INFO);
    }

    /* DeAllocate Workspace */
    MORSE_Dealloc_Workspace(&descT);

    free( A );
    return 0;
}