diff --git a/control/common.h b/control/common.h index ad11d04ddb68c8477e5cb43eb3dc5df7269e32d6..14579e68ff09aac0b2248ec5ae93a888729d9278 100644 --- a/control/common.h +++ b/control/common.h @@ -112,10 +112,8 @@ extern "C" { #include "control/compute_s.h" #include "control/compute_d.h" -#define COMPLEX #include "control/compute_c.h" #include "control/compute_z.h" -#undef COMPLEX /* void morse_pdlag2s(MORSE_context_t *morse); diff --git a/control/compute_z.h b/control/compute_z.h index 67c7815f4209f88bd510c82f8259f80dc6f96f6b..2f8e8492a0e19534341f1d1991f9bd7a009e12e3 100644 --- a/control/compute_z.h +++ b/control/compute_z.h @@ -77,18 +77,14 @@ void morse_pzgetrf_nopiv(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_requ void morse_pzgetrf_reclap(MORSE_desc_t *A, int *IPIV, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzgetrf_rectil(MORSE_desc_t *A, int *IPIV, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzhegst(MORSE_enum itype, MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX void morse_pzhemm(MORSE_enum side, MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzherk(MORSE_enum uplo, MORSE_enum trans, double alpha, MORSE_desc_t *A, double beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzher2k(MORSE_enum uplo, MORSE_enum trans, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, double beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request); -#endif void morse_pzhetrd_he2hb(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *E, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzlacpy(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzlag2c(MORSE_desc_t *A, MORSE_desc_t *SB, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzlange(MORSE_enum norm, MORSE_desc_t *A, double *result, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX void morse_pzlanhe(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *result, MORSE_sequence_t *sequence, MORSE_request_t *request); -#endif void morse_pzlansy(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *result, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag, MORSE_desc_t *A, double *result, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzlascal(MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request); @@ -97,9 +93,7 @@ void morse_pzlaset2(MORSE_enum uplo, MORSE_Complex64_t alpha, void morse_pzlaswp(MORSE_desc_t *B, int *IPIV, int inc, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzlaswpc(MORSE_desc_t *B, int *IPIV, int inc, MORSE_sequence_t *sequence, MORSE_request_t *request); void morse_pzlauum(MORSE_enum uplo, MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX void morse_pzplghe(double bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed, MORSE_sequence_t *sequence, MORSE_request_t *request ); -#endif void morse_pzplgsy(MORSE_Complex64_t bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed, MORSE_sequence_t *sequence, MORSE_request_t *request ); void morse_pzplrnt(MORSE_desc_t *A, unsigned long long int seed, MORSE_sequence_t *sequence, MORSE_request_t *request ); void morse_pzpotrf(MORSE_enum uplo, MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request); diff --git a/control/morse_zf77.c b/control/morse_zf77.c index b600f740f77e6ae8c03add42c16e970221d81676..6785f83b8d5c408d70417e2b881b5dca283219aa 100644 --- a/control/morse_zf77.c +++ b/control/morse_zf77.c @@ -27,9 +27,6 @@ #include <stdlib.h> #include "control/common.h" #include "control/morse_f77.h" -#undef REAL -#define COMPLEX - /** * FORTRAN API - math functions (simple interface) @@ -63,19 +60,19 @@ //#define MORSE_ZHEGST MORSE_FNAME(zhegst , ZHEGST ) //#define MORSE_ZHEGV MORSE_FNAME(zhegv , ZHEGV ) //#define MORSE_ZHEGVD MORSE_FNAME(zhegvd , ZHEGVD ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZHEMM MORSE_FNAME(zhemm , ZHEMM ) #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZHER2K MORSE_FNAME(zher2k , ZHER2K ) #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZHERK MORSE_FNAME(zherk , ZHERK ) #endif //#define MORSE_ZHETRD MORSE_FNAME(zhetrd , ZHETRD ) #define MORSE_ZLACPY MORSE_FNAME(zlacpy , ZLACPY ) #define MORSE_ZLANGE MORSE_FNAME(zlange , ZLANGE ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZLANHE MORSE_FNAME(zlanhe , ZLANHE ) #endif #define MORSE_ZLANSY MORSE_FNAME(zlansy , ZLANSY ) @@ -84,7 +81,7 @@ //#define MORSE_ZLASWP MORSE_FNAME(zlaswp , ZLASWP ) //#define MORSE_ZLASWPC MORSE_FNAME(zlaswpc , ZLASWPC ) #define MORSE_ZLAUUM MORSE_FNAME(zlauum , ZLAUUM ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZPLGHE MORSE_FNAME(zplghe , ZPLGHE ) #endif #define MORSE_ZPLGSY MORSE_FNAME(zplgsy , ZPLGSY ) @@ -137,19 +134,19 @@ //#define MORSE_ZHEGST_TILE MORSE_TILE_FNAME(zhegst , ZHEGST ) //#define MORSE_ZHEGV_TILE MORSE_TILE_FNAME(zhegv , ZHEGV ) //#define MORSE_ZHEGVD_TILE MORSE_TILE_FNAME(zhegvd , ZHEGVD ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZHEMM_TILE MORSE_TILE_FNAME(zhemm , ZHEMM ) #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZHER2K_TILE MORSE_TILE_FNAME(zher2k , ZHER2K ) #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZHERK_TILE MORSE_TILE_FNAME(zherk , ZHERK ) #endif //#define MORSE_ZHETRD_TILE MORSE_TILE_FNAME(zhetrd , ZHETRD ) #define MORSE_ZLACPY_TILE MORSE_TILE_FNAME(zlacpy , ZLACPY ) #define MORSE_ZLANGE_TILE MORSE_TILE_FNAME(zlange , ZLANGE ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZLANHE_TILE MORSE_TILE_FNAME(zlanhe , ZLANHE ) #endif #define MORSE_ZLANSY_TILE MORSE_TILE_FNAME(zlansy , ZLANSY ) @@ -157,7 +154,7 @@ //#define MORSE_ZLASWP_TILE MORSE_TILE_FNAME(zlaswp , ZLASWP ) //#define MORSE_ZLASWPC_TILE MORSE_TILE_FNAME(zlaswpc , ZLASWPC ) #define MORSE_ZLAUUM_TILE MORSE_TILE_FNAME(zlauum , ZLAUUM ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZPLGHE_TILE MORSE_TILE_FNAME(zplghe , ZPLGHE ) #endif #define MORSE_ZPLGSY_TILE MORSE_TILE_FNAME(zplgsy , ZPLGSY ) @@ -210,7 +207,7 @@ //#define MORSE_ZHEGST_TILE_ASYNC MORSE_ASYNC_FNAME(zhegst , ZHEGST ) //#define MORSE_ZHEGV_TILE_ASYNC MORSE_ASYNC_FNAME(zhegv , ZHEGV ) //#define MORSE_ZHEGVD_TILE_ASYNC MORSE_ASYNC_FNAME(zhegvd , ZHEGVD ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZHEMM_TILE_ASYNC MORSE_ASYNC_FNAME(zhemm , ZHEMM ) #define MORSE_ZHER2K_TILE_ASYNC MORSE_ASYNC_FNAME(zher2k , ZHER2K ) #define MORSE_ZHERK_TILE_ASYNC MORSE_ASYNC_FNAME(zherk , ZHERK ) @@ -218,7 +215,7 @@ //#define MORSE_ZHETRD_TILE_ASYNC MORSE_ASYNC_FNAME(zhetrd , ZHETRD ) #define MORSE_ZLACPY_TILE_ASYNC MORSE_ASYNC_FNAME(zlacpy , ZLACPY ) #define MORSE_ZLANGE_TILE_ASYNC MORSE_ASYNC_FNAME(zlange , ZLANGE ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZLANHE_TILE_ASYNC MORSE_ASYNC_FNAME(zlanhe , ZLANHE ) #endif #define MORSE_ZLANSY_TILE_ASYNC MORSE_ASYNC_FNAME(zlansy , ZLANSY ) @@ -227,7 +224,7 @@ //#define MORSE_ZLASWP_TILE_ASYNC MORSE_ASYNC_FNAME(zlaswp , ZLASWP ) //#define MORSE_ZLASWPC_TILE_ASYNC MORSE_ASYNC_FNAME(zlaswpc , ZLASWPC ) #define MORSE_ZLAUUM_TILE_ASYNC MORSE_ASYNC_FNAME(zlauum , ZLAUUM ) -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define MORSE_ZPLGHE_TILE_ASYNC MORSE_ASYNC_FNAME(zplghe , ZPLGHE ) #endif #define MORSE_ZPLGSY_TILE_ASYNC MORSE_ASYNC_FNAME(zplgsy , ZPLGSY ) @@ -370,17 +367,17 @@ void MORSE_ZGETRS_NOPIV(MORSE_enum *trans, int *N, int *NRHS, MORSE_Complex64_t //void MORSE_ZHEGVD(MORSE_enum *itype, MORSE_enum *jobz, MORSE_enum *uplo, int *N, MORSE_Complex64_t *A, int *LDA, MORSE_Complex64_t *B, int *LDB, double *W, MORSE_desc_t **descT, MORSE_Complex64_t *Q, int *LDQ, int *info) //{ *info = MORSE_zhegvd(*itype, *jobz, *uplo, *N, A, *LDA, B, *LDB, W, *descT, Q, *LDQ); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHEMM(MORSE_enum *side, MORSE_enum *uplo, int *M, int *N, MORSE_Complex64_t *alpha, MORSE_Complex64_t *A, int *LDA, MORSE_Complex64_t *B, int *LDB, MORSE_Complex64_t *beta, MORSE_Complex64_t *C, int *LDC, int *info) { *info = MORSE_zhemm(*side, *uplo, *M, *N, *alpha, A, *LDA, B, *LDB, *beta, C, *LDC); } #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHER2K(MORSE_enum *uplo, MORSE_enum *trans, int *N, int *K, MORSE_Complex64_t *alpha, MORSE_Complex64_t *A, int *LDA, MORSE_Complex64_t *B, int *LDB, double *beta, MORSE_Complex64_t *C, int *LDC, int *info) { *info = MORSE_zher2k(*uplo, *trans, *N, *K, *alpha, A, *LDA, B, *LDB, *beta, C, *LDC); } #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHERK(MORSE_enum *uplo, MORSE_enum *trans, int *N, int *K, double *alpha, MORSE_Complex64_t *A, int *LDA, double *beta, MORSE_Complex64_t *C, int *LDC, int *info) { *info = MORSE_zherk(*uplo, *trans, *N, *K, *alpha, A, *LDA, *beta, C, *LDC); } #endif @@ -394,7 +391,7 @@ void MORSE_ZLACPY(MORSE_enum *uplo, int *M, int *N, MORSE_Complex64_t *A, int *L void MORSE_ZLANGE(MORSE_enum *norm, int *M, int *N, MORSE_Complex64_t *A, int *LDA, double *result) { *result = MORSE_zlange(*norm, *M, *N, A, *LDA); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZLANHE(MORSE_enum *norm, MORSE_enum *uplo, int *N, MORSE_Complex64_t *A, int *LDA, double *result) { *result = MORSE_zlanhe(*norm, *uplo, *N, A, *LDA); } #endif @@ -417,7 +414,7 @@ void MORSE_ZLASET(MORSE_enum *uplo, int *M, int *N, MORSE_Complex64_t *alpha, MO void MORSE_ZLAUUM(MORSE_enum *uplo, int *N, MORSE_Complex64_t *A, int *LDA, int *info) { *info = MORSE_zlauum(*uplo, *N, A, *LDA); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZPLGHE(double *bump, MORSE_enum *uplo, int *N, MORSE_Complex64_t *A, int *LDA, unsigned long long int *seed, int *info) { *info = MORSE_zplghe(*bump, *uplo, *N, A, *LDA, *seed); } #endif @@ -560,17 +557,17 @@ void MORSE_ZGETRS_NOPIV_TILE(MORSE_desc_t *A, MORSE_desc_t *B, int *info) //void MORSE_ZHEGVD_TILE(MORSE_enum *itype, MORSE_enum *jobz, MORSE_enum *uplo, MORSE_desc_t *A, MORSE_desc_t *B, double *W, MORSE_desc_t *T, MORSE_desc_t *Q, int *info) //{ *info = MORSE_zhegvd_Tile(*itype, *jobz, *uplo, A, B, W, T, Q); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHEMM_TILE(MORSE_enum *side, MORSE_enum *uplo, MORSE_Complex64_t *alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t *beta, MORSE_desc_t *C, int *info) { *info = MORSE_zhemm_Tile(*side, *uplo, *alpha, A, B, *beta, C); } #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHER2K_TILE(MORSE_enum *uplo, MORSE_enum *trans, MORSE_Complex64_t *alpha, MORSE_desc_t *A, MORSE_desc_t *B, double *beta, MORSE_desc_t *C, int *info) { *info = MORSE_zher2k_Tile(*uplo, *trans, *alpha, A, B, *beta, C); } #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHERK_TILE(MORSE_enum *uplo, MORSE_enum *trans, double *alpha, MORSE_desc_t *A, double *beta, MORSE_desc_t *C, int *info) { *info = MORSE_zherk_Tile(*uplo, *trans, *alpha, A, *beta, C); } #endif @@ -584,7 +581,7 @@ void MORSE_ZLACPY_TILE(MORSE_enum *uplo, MORSE_desc_t *A, MORSE_desc_t *B, int * void MORSE_ZLANGE_TILE(MORSE_enum *norm, MORSE_desc_t *A, double *result) { *result = MORSE_zlange_Tile(*norm, A); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZLANHE_TILE(MORSE_enum *norm, MORSE_enum *uplo, MORSE_desc_t *A, double *result) { *result = MORSE_zlanhe_Tile(*norm, *uplo, A); } #endif @@ -607,7 +604,7 @@ void MORSE_ZLASET_TILE(MORSE_enum *uplo, MORSE_Complex64_t *alpha, MORSE_Complex void MORSE_ZLAUUM_TILE(MORSE_enum *uplo, MORSE_desc_t *A, int *info) { *info = MORSE_zlauum_Tile(*uplo, A); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZPLGHE_TILE(double *bump, MORSE_enum *uplo, MORSE_desc_t *A, unsigned long long int *seed, int *info) { *info = MORSE_zplghe_Tile(*bump, *uplo, A, *seed); } #endif @@ -750,17 +747,17 @@ void MORSE_ZGETRS_NOPIV_TILE_ASYNC(MORSE_desc_t *A, MORSE_desc_t *B, MORSE_seque //void MORSE_ZHEGVD_TILE_ASYNC(MORSE_enum *itype, MORSE_enum *jobz, MORSE_enum *uplo, MORSE_desc_t *A, MORSE_desc_t *B, double *W, MORSE_desc_t *T, MORSE_desc_t *Q, MORSE_sequence_t *sequence, MORSE_request_t *request, int *info) //{ *info = MORSE_zhegvd_Tile_Async(*itype, *jobz, *uplo, A, B, W, T, Q, sequence, request); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHEMM_TILE_ASYNC(MORSE_enum *side, MORSE_enum *uplo, MORSE_Complex64_t *alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t *beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request, int *info) { *info = MORSE_zhemm_Tile_Async(*side, *uplo, *alpha, A, B, *beta, C, sequence, request); } #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHER2K_TILE_ASYNC(MORSE_enum *uplo, MORSE_enum *trans, MORSE_Complex64_t *alpha, MORSE_desc_t *A, MORSE_desc_t *B, double *beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request, int *info) { *info = MORSE_zher2k_Tile_Async(*uplo, *trans, *alpha, A, B, *beta, C, sequence, request); } #endif -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZHERK_TILE_ASYNC(MORSE_enum *uplo, MORSE_enum *trans, double *alpha, MORSE_desc_t *A, double *beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request, int *info) { *info = MORSE_zherk_Tile_Async(*uplo, *trans, *alpha, A, *beta, C, sequence, request); } #endif @@ -774,7 +771,7 @@ void MORSE_ZLACPY_TILE_ASYNC(MORSE_enum *uplo, MORSE_desc_t *A, MORSE_desc_t *B, void MORSE_ZLANGE_TILE_ASYNC(MORSE_enum *norm, MORSE_desc_t *A, double *value, MORSE_sequence_t *sequence, MORSE_request_t *request, int *info) { *info = MORSE_zlange_Tile_Async(*norm, A, value, sequence, request); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZLANHE_TILE_ASYNC(MORSE_enum *norm, MORSE_enum *uplo, MORSE_desc_t *A, double *value, MORSE_sequence_t *sequence, MORSE_request_t *request, int *info) { *info = MORSE_zlanhe_Tile_Async(*norm, *uplo, A, value, sequence, request); } #endif @@ -797,7 +794,7 @@ void MORSE_ZLASET_TILE_ASYNC(MORSE_enum *uplo, MORSE_Complex64_t *alpha, MORSE_C void MORSE_ZLAUUM_TILE_ASYNC(MORSE_enum *uplo, MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request, int *info) { *info = MORSE_zlauum_Tile_Async(*uplo, A, sequence, request); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) void MORSE_ZPLGHE_TILE_ASYNC(double *bump, MORSE_enum *uplo, MORSE_desc_t *A, unsigned long long int *seed, MORSE_sequence_t *sequence, MORSE_request_t * *request, int *info) { *info = MORSE_zplghe_Tile_Async(*bump, *uplo, A, *seed, sequence, *request); } #endif diff --git a/coreblas/compute/core_zgessq.c b/coreblas/compute/core_zgessq.c index ac4547a370101b0e008e07b383f8810854aac3f2..9a8723dbd3974b7f9683a5a5d7653041b12ee482 100644 --- a/coreblas/compute/core_zgessq.c +++ b/coreblas/compute/core_zgessq.c @@ -23,8 +23,6 @@ #include "coreblas/lapacke.h" #include "coreblas.h" -#define COMPLEX - #define UPDATE( __nb, __value ) \ if (__value != 0. ){ \ if ( *scale < __value ) { \ @@ -89,7 +87,6 @@ * \retval -k, the k-th argument had an illegal value * */ - int CORE_zgessq(int M, int N, const MORSE_Complex64_t *A, int LDA, double *scale, double *sumsq) @@ -104,7 +101,7 @@ int CORE_zgessq(int M, int N, tmp = fabs(*ptr); UPDATE( 1., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; tmp = fabs(*ptr); UPDATE( 1., tmp ); diff --git a/coreblas/compute/core_zhemm.c b/coreblas/compute/core_zhemm.c index ba7255f9cb26077177e95f77a4c52afc58d89335..c908bd7e891529c77cb063ba35319f6c95f10363 100644 --- a/coreblas/compute/core_zhemm.c +++ b/coreblas/compute/core_zhemm.c @@ -25,9 +25,6 @@ */ #include "coreblas.h" -#undef REAL -#define COMPLEX -#ifdef COMPLEX /** * * @ingroup CORE_MORSE_Complex64_t @@ -47,6 +44,3 @@ void CORE_zhemm(MORSE_enum side, MORSE_enum uplo, B, LDB, CBLAS_SADDR(beta), C, LDC); } - - -#endif diff --git a/coreblas/compute/core_zher2k.c b/coreblas/compute/core_zher2k.c index 8b894f50be7feb8bc612be0cbcc9cba314f7cc5c..f7af24a7dcab8dc69a089c5238e7a7707ee77db1 100644 --- a/coreblas/compute/core_zher2k.c +++ b/coreblas/compute/core_zher2k.c @@ -25,9 +25,6 @@ */ #include "coreblas.h" -#undef REAL -#define COMPLEX -#ifdef COMPLEX /** * * @ingroup CORE_MORSE_Complex64_t @@ -46,6 +43,3 @@ void CORE_zher2k(MORSE_enum uplo, MORSE_enum trans, CBLAS_SADDR(alpha), A, LDA, B, LDB, beta, C, LDC); } - - -#endif diff --git a/coreblas/compute/core_zherk.c b/coreblas/compute/core_zherk.c index bff780e94a1f0d0f7dbedf395aa23ee2470b69cd..ec57c9e35838d1921208595927948bb6998d8b61 100644 --- a/coreblas/compute/core_zherk.c +++ b/coreblas/compute/core_zherk.c @@ -25,9 +25,6 @@ */ #include "coreblas.h" -#undef REAL -#define COMPLEX -#ifdef COMPLEX /** * * @ingroup CORE_MORSE_Complex64_t @@ -45,6 +42,3 @@ void CORE_zherk(MORSE_enum uplo, MORSE_enum trans, alpha, A, LDA, beta, C, LDC); } - - -#endif diff --git a/coreblas/compute/core_zhessq.c b/coreblas/compute/core_zhessq.c index 427c62cc210a67b87604f65957d297bf65e1d589..23915b59a3a5252be0e03ff59d6998a8bc57cc25 100644 --- a/coreblas/compute/core_zhessq.c +++ b/coreblas/compute/core_zhessq.c @@ -23,8 +23,6 @@ #include "coreblas/lapacke.h" #include "coreblas.h" -#define COMPLEX - #define UPDATE( __nb, __value ) \ if (__value != 0. ){ \ if ( *scale < __value ) { \ @@ -113,7 +111,7 @@ int CORE_zhessq(MORSE_enum uplo, int N, tmp = fabs(*ptr); UPDATE( 2., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; tmp = fabs(*ptr); UPDATE( 2., tmp ); @@ -124,7 +122,7 @@ int CORE_zhessq(MORSE_enum uplo, int N, tmp = fabs(*ptr); UPDATE( 1., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; #endif } @@ -138,7 +136,7 @@ int CORE_zhessq(MORSE_enum uplo, int N, UPDATE( 1., tmp ); ptr++; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; #endif @@ -147,7 +145,7 @@ int CORE_zhessq(MORSE_enum uplo, int N, tmp = fabs(*ptr); UPDATE( 2., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; tmp = fabs(*ptr); UPDATE( 2., tmp ); diff --git a/coreblas/compute/core_zplghe.c b/coreblas/compute/core_zplghe.c index ff9f984a88df9d226a07c1887cdd21c2fd9463dd..6c5d16f423b8a2416b941b18e176c591cc439566 100644 --- a/coreblas/compute/core_zplghe.c +++ b/coreblas/compute/core_zplghe.c @@ -25,9 +25,6 @@ */ #include "coreblas.h" -#define COMPLEX -#undef REAL - /* Rnd64seed is a global variable but it doesn't spoil thread safety. All matrix generating threads only read Rnd64seed. It is safe to set Rnd64seed before @@ -41,7 +38,7 @@ #define RndF_Mul 5.4210108624275222e-20f #define RndD_Mul 5.4210108624275222e-20 -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define NBELEM 2 #else #define NBELEM 1 @@ -87,7 +84,7 @@ void CORE_zplghe( double bump, int m, int n, MORSE_Complex64_t *A, int lda, for (i = j; i < m; i++) { *tmp = 0.5f - ran * RndF_Mul; ran = Rnd64_A * ran + Rnd64_C; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) *tmp += I*(0.5f - ran * RndF_Mul); ran = Rnd64_A * ran + Rnd64_C; #endif @@ -98,7 +95,7 @@ void CORE_zplghe( double bump, int m, int n, MORSE_Complex64_t *A, int lda, } for (j = 0; j < n; j++) { -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) A[j+j*lda] += bump - I*cimag( A[j+j*lda] ); #else A[j+j*lda] += bump; @@ -119,7 +116,7 @@ void CORE_zplghe( double bump, int m, int n, MORSE_Complex64_t *A, int lda, for (i = 0; i < m; i++) { *tmp = 0.5f - ran * RndF_Mul; ran = Rnd64_A * ran + Rnd64_C; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) *tmp += I*(0.5f - ran * RndF_Mul); ran = Rnd64_A * ran + Rnd64_C; #endif @@ -142,7 +139,7 @@ void CORE_zplghe( double bump, int m, int n, MORSE_Complex64_t *A, int lda, for (j = 0; j < n; j++) { A[j*lda+i] = 0.5f - ran * RndF_Mul; ran = Rnd64_A * ran + Rnd64_C; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) A[j*lda+i] -= I*(0.5f - ran * RndF_Mul); ran = Rnd64_A * ran + Rnd64_C; #endif diff --git a/coreblas/compute/core_zplgsy.c b/coreblas/compute/core_zplgsy.c index 4f61012aea9c2fa887764eec92a7920188d84fc6..e2af54bdb3c2196539eb9fa65875f160ee518b6c 100644 --- a/coreblas/compute/core_zplgsy.c +++ b/coreblas/compute/core_zplgsy.c @@ -25,9 +25,6 @@ */ #include "coreblas.h" -#define COMPLEX -#undef REAL - /* Rnd64seed is a global variable but it doesn't spoil thread safety. All matrix generating threads only read Rnd64seed. It is safe to set Rnd64seed before @@ -41,7 +38,7 @@ #define RndF_Mul 5.4210108624275222e-20f #define RndD_Mul 5.4210108624275222e-20 -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define NBELEM 2 #else #define NBELEM 1 @@ -88,7 +85,7 @@ void CORE_zplgsy( MORSE_Complex64_t bump, int m, int n, MORSE_Complex64_t *A, in for (i = j; i < m; i++) { *tmp = 0.5f - ran * RndF_Mul; ran = Rnd64_A * ran + Rnd64_C; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) *tmp += I*(0.5f - ran * RndF_Mul); ran = Rnd64_A * ran + Rnd64_C; #endif @@ -116,7 +113,7 @@ void CORE_zplgsy( MORSE_Complex64_t bump, int m, int n, MORSE_Complex64_t *A, in for (i = 0; i < m; i++) { *tmp = 0.5f - ran * RndF_Mul; ran = Rnd64_A * ran + Rnd64_C; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) *tmp += I*(0.5f - ran * RndF_Mul); ran = Rnd64_A * ran + Rnd64_C; #endif @@ -139,7 +136,7 @@ void CORE_zplgsy( MORSE_Complex64_t bump, int m, int n, MORSE_Complex64_t *A, in for (j = 0; j < n; j++) { A[j*lda+i] = 0.5f - ran * RndF_Mul; ran = Rnd64_A * ran + Rnd64_C; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) A[j*lda+i] += I*(0.5f - ran * RndF_Mul); ran = Rnd64_A * ran + Rnd64_C; #endif diff --git a/coreblas/compute/core_zplrnt.c b/coreblas/compute/core_zplrnt.c index f272dd3f9b682244cc4a8b29ac0712fcf2d89d93..8f4971dabf71fba964f563406d14031ee8940d17 100644 --- a/coreblas/compute/core_zplrnt.c +++ b/coreblas/compute/core_zplrnt.c @@ -25,9 +25,6 @@ */ #include "coreblas.h" -#define COMPLEX -#undef REAL - /* Rnd64seed is a global variable but it doesn't spoil thread safety. All matrix generating threads only read Rnd64seed. It is safe to set Rnd64seed before @@ -41,7 +38,7 @@ #define RndF_Mul 5.4210108624275222e-20f #define RndD_Mul 5.4210108624275222e-20 -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) #define NBELEM 2 #else #define NBELEM 1 @@ -82,7 +79,7 @@ void CORE_zplrnt( int m, int n, MORSE_Complex64_t *A, int lda, for (i = 0; i < m; ++i) { *tmp = 0.5f - ran * RndF_Mul; ran = Rnd64_A * ran + Rnd64_C; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) *tmp += I*(0.5f - ran * RndF_Mul); ran = Rnd64_A * ran + Rnd64_C; #endif diff --git a/coreblas/compute/core_zsyssq.c b/coreblas/compute/core_zsyssq.c index 80b16a4ccb51cce643cad75864e6187180fb2dff..b1c16e6f3f70fd6b9e47a0a9652ecc141d0d24bd 100644 --- a/coreblas/compute/core_zsyssq.c +++ b/coreblas/compute/core_zsyssq.c @@ -23,8 +23,6 @@ #include "coreblas/lapacke.h" #include "coreblas.h" -#define COMPLEX - #define UPDATE( __nb, __value ) \ if (__value != 0. ){ \ if ( *scale < __value ) { \ @@ -113,7 +111,7 @@ int CORE_zsyssq(MORSE_enum uplo, int N, tmp = fabs(*ptr); UPDATE( 2., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; tmp = fabs(*ptr); UPDATE( 2., tmp ); @@ -124,7 +122,7 @@ int CORE_zsyssq(MORSE_enum uplo, int N, tmp = fabs(*ptr); UPDATE( 1., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; tmp = fabs(*ptr); UPDATE( 1., tmp ); @@ -140,7 +138,7 @@ int CORE_zsyssq(MORSE_enum uplo, int N, UPDATE( 1., tmp ); ptr++; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) tmp = fabs(*ptr); UPDATE( 1., tmp ); ptr++; @@ -151,7 +149,7 @@ int CORE_zsyssq(MORSE_enum uplo, int N, tmp = fabs(*ptr); UPDATE( 2., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; tmp = fabs(*ptr); UPDATE( 2., tmp ); diff --git a/coreblas/compute/core_ztrssq.c b/coreblas/compute/core_ztrssq.c index 53eb52f0fa22fb005265ff0f77ecfabf61c0afb9..207768b32ea696cff98b390daa2c08036be94d0c 100644 --- a/coreblas/compute/core_ztrssq.c +++ b/coreblas/compute/core_ztrssq.c @@ -23,8 +23,6 @@ #include "coreblas/lapacke.h" #include "coreblas.h" -#define COMPLEX - #define UPDATE( __nb, __value ) \ if (__value != 0. ){ \ if ( *scale < __value ) { \ @@ -115,7 +113,7 @@ int CORE_ztrssq(MORSE_enum uplo, MORSE_enum diag, int M, int N, tmp = fabs(*ptr); UPDATE( 1., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; tmp = fabs(*ptr); UPDATE( 1., tmp ); @@ -133,7 +131,7 @@ int CORE_ztrssq(MORSE_enum uplo, MORSE_enum diag, int M, int N, tmp = fabs(*ptr); UPDATE( 1., tmp ); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) ptr++; tmp = fabs(*ptr); UPDATE( 1., tmp ); diff --git a/coreblas/compute/core_ztslqt.c b/coreblas/compute/core_ztslqt.c index 67817bc412ceb1c01c63eb1d73b3912a5a275007..ce9e955dfd93cd057bfaf21b780119d917958597 100644 --- a/coreblas/compute/core_ztslqt.c +++ b/coreblas/compute/core_ztslqt.c @@ -25,8 +25,6 @@ */ #include "coreblas/lapacke.h" #include "coreblas.h" -#undef REAL -#define COMPLEX /** * @@ -142,7 +140,7 @@ int CORE_ztslqt(int M, int N, int IB, /* * Generate elementary reflector H( II*IB+I ) to annihilate A( II*IB+I, II*IB+I:N ). */ -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(N, &A2[ii+i], LDA2); LAPACKE_zlacgv_work(1, &A1[LDA1*(ii+i)+ii+i], LDA1); #endif @@ -184,7 +182,7 @@ int CORE_ztslqt(int M, int N, int IB, CBLAS_SADDR(alpha), &A2[ii], LDA2, &A2[ii+i], LDA2, CBLAS_SADDR(zzero), &T[LDT*(ii+i)], 1); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(N, &A2[ii+i], LDA2 ); LAPACKE_zlacgv_work(1, &A1[LDA1*(ii+i)+ii+i], LDA1 ); #endif diff --git a/coreblas/compute/core_ztsqrt.c b/coreblas/compute/core_ztsqrt.c index 2a811493e5f0accd3f794a5e7c9e8bd990e1e35b..92841443166aca0fe9806131a10a282d318150fe 100644 --- a/coreblas/compute/core_ztsqrt.c +++ b/coreblas/compute/core_ztsqrt.c @@ -25,8 +25,6 @@ */ #include "coreblas/lapacke.h" #include "coreblas.h" -#undef REAL -#define COMPLEX /** * @@ -144,7 +142,7 @@ int CORE_ztsqrt(int M, int N, int IB, sb-i-1, &A1[LDA1*(ii+i+1)+(ii+i)], LDA1, WORK, 1); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(sb-i-1, WORK, 1); #endif cblas_zgemv( @@ -153,14 +151,14 @@ int CORE_ztsqrt(int M, int N, int IB, CBLAS_SADDR(zone), &A2[LDA2*(ii+i+1)], LDA2, &A2[LDA2*(ii+i)], 1, CBLAS_SADDR(zone), WORK, 1); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(sb-i-1, WORK, 1 ); #endif cblas_zaxpy( sb-i-1, CBLAS_SADDR(alpha), WORK, 1, &A1[LDA1*(ii+i+1)+ii+i], LDA1); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(sb-i-1, WORK, 1 ); #endif cblas_zgerc( diff --git a/coreblas/compute/core_zttlqt.c b/coreblas/compute/core_zttlqt.c index 4930772b9e9d0229105875dd6aedead4bc06d5dc..3c0aa09b83070f07a8698e7f92cb857edaeff3fb 100644 --- a/coreblas/compute/core_zttlqt.c +++ b/coreblas/compute/core_zttlqt.c @@ -25,8 +25,6 @@ */ #include "coreblas/lapacke.h" #include "coreblas.h" -#undef REAL -#define COMPLEX /** * @@ -111,7 +109,7 @@ int CORE_zttlqt(int M, int N, int IB, { static MORSE_Complex64_t zone = 1.0; static MORSE_Complex64_t zzero = 0.0; -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) static int ione = 1; #endif @@ -154,7 +152,7 @@ int CORE_zttlqt(int M, int N, int IB, /* * Generate elementary reflector H( II*IB+I ) to annihilate A( II*IB+I, II*IB+I:M ). */ -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(ni, &A2[j], LDA2); LAPACKE_zlacgv_work(ione, &A1[LDA1*j+j], LDA1); #endif @@ -216,7 +214,7 @@ int CORE_zttlqt(int M, int N, int IB, } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(ni, &A2[j], LDA2 ); LAPACKE_zlacgv_work(ione, &A1[LDA1*j+j], LDA1 ); #endif diff --git a/coreblas/compute/core_zttqrt.c b/coreblas/compute/core_zttqrt.c index f2d4dfbcf5b66b0708c7e1f6d0d09049999948fd..a55d6d7d38736331d3ebf7833af8524d2e7de619 100644 --- a/coreblas/compute/core_zttqrt.c +++ b/coreblas/compute/core_zttqrt.c @@ -25,8 +25,6 @@ */ #include "coreblas/lapacke.h" #include "coreblas.h" -#undef REAL -#define COMPLEX /** * @@ -166,7 +164,7 @@ int CORE_zttqrt(int M, int N, int IB, &A1[LDA1*(j+1)+j], LDA1, WORK, 1); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(ni, WORK, 1); #endif cblas_zgemv( @@ -175,7 +173,7 @@ int CORE_zttqrt(int M, int N, int IB, CBLAS_SADDR(zone), &A2[LDA2*(j+1)], LDA2, &A2[LDA2*j], 1, CBLAS_SADDR(zone), WORK, 1); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(ni, WORK, 1); #endif alpha = -conj(TAU[j]); @@ -183,7 +181,7 @@ int CORE_zttqrt(int M, int N, int IB, ni, CBLAS_SADDR(alpha), WORK, 1, &A1[LDA1*(j+1)+j], LDA1); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) LAPACKE_zlacgv_work(ni, WORK, 1); #endif cblas_zgerc( diff --git a/coreblas/include/coreblas/coreblas_z.h b/coreblas/include/coreblas/coreblas_z.h index 82d2febaec2e2eb118e2ffdee5342139da263764..4589e60f9867d9fa98fabde61ace3fda9c61db7b 100644 --- a/coreblas/include/coreblas/coreblas_z.h +++ b/coreblas/include/coreblas/coreblas_z.h @@ -27,8 +27,6 @@ #ifndef _MORSE_CORE_ZBLAS_H_ #define _MORSE_CORE_ZBLAS_H_ -#define COMPLEX - /** * Declarations of serial kernels - alphabetical order */ @@ -128,7 +126,6 @@ void CORE_zhbtype3cb(int N, int NB, void CORE_zhegst(int itype, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, int *INFO); -#ifdef COMPLEX void CORE_zhemm(MORSE_enum side, MORSE_enum uplo, int M, int N, MORSE_Complex64_t alpha, const MORSE_Complex64_t *A, int LDA, @@ -146,7 +143,6 @@ void CORE_zher2k(MORSE_enum uplo, MORSE_enum trans, int CORE_zhessq(MORSE_enum uplo, int N, const MORSE_Complex64_t *A, int LDA, double *scale, double *sumsq); -#endif int CORE_zherfb(MORSE_enum uplo, int N, int K, int IB, int NB, const MORSE_Complex64_t *A, int LDA, const MORSE_Complex64_t *T, int LDT, @@ -158,11 +154,9 @@ void CORE_zlacpy(MORSE_enum uplo, int M, int N, void CORE_zlange(int norm, int M, int N, const MORSE_Complex64_t *A, int LDA, double *work, double *normA); -#ifdef COMPLEX void CORE_zlanhe(int norm, MORSE_enum uplo, int N, const MORSE_Complex64_t *A, int LDA, double *work, double *normA); -#endif void CORE_zlansy(int norm, MORSE_enum uplo, int N, const MORSE_Complex64_t *A, int LDA, double *work, double *normA); @@ -405,7 +399,4 @@ int CORE_zunmqr(MORSE_enum side, MORSE_enum trans, const MORSE_Complex64_t *T, int LDT, MORSE_Complex64_t *C, int LDC, MORSE_Complex64_t *WORK, int LDWORK); - -#undef COMPLEX - #endif diff --git a/doc/texinfo/chapters/using.texi b/doc/texinfo/chapters/using.texi index 0480af530e832f6fea2c8fa9946d2cb59d34ff21..61963c4410973358ad5d0b268bbfeb593075128f 100644 --- a/doc/texinfo/chapters/using.texi +++ b/doc/texinfo/chapters/using.texi @@ -939,7 +939,6 @@ int MORSE_zgetrs_nopiv(MORSE_enum trans, int N, int NRHS, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB); -#ifdef COMPLEX int MORSE_zhemm(MORSE_enum side, MORSE_enum uplo, int M, int N, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, MORSE_Complex64_t beta, @@ -953,7 +952,6 @@ int MORSE_zher2k(MORSE_enum uplo, MORSE_enum trans, int N, int K, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, double beta, MORSE_Complex64_t *C, int LDC); -#endif int MORSE_zlacpy(MORSE_enum uplo, int M, int N, MORSE_Complex64_t *A, int LDA, @@ -962,10 +960,8 @@ int MORSE_zlacpy(MORSE_enum uplo, int M, int N, double MORSE_zlange(MORSE_enum norm, int M, int N, MORSE_Complex64_t *A, int LDA); -#ifdef COMPLEX double MORSE_zlanhe(MORSE_enum norm, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA); -#endif double MORSE_zlansy(MORSE_enum norm, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA); @@ -978,11 +974,9 @@ int MORSE_zlaset(MORSE_enum uplo, int M, int N, MORSE_Complex64_t alpha, int MORSE_zlauum(MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA); -#ifdef COMPLEX int MORSE_zplghe( double bump, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, unsigned long long int seed ); -#endif int MORSE_zplgsy( MORSE_Complex64_t bump, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, @@ -1098,7 +1092,6 @@ int MORSE_zgetrs_incpiv_Tile(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV, int MORSE_zgetrs_nopiv_Tile(MORSE_desc_t *A, MORSE_desc_t *B); -#ifdef COMPLEX int MORSE_zhemm_Tile(MORSE_enum side, MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t beta, @@ -1111,15 +1104,12 @@ int MORSE_zherk_Tile(MORSE_enum uplo, MORSE_enum trans, int MORSE_zher2k_Tile(MORSE_enum uplo, MORSE_enum trans, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, double beta, MORSE_desc_t *C); -#endif int MORSE_zlacpy_Tile(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B); double MORSE_zlange_Tile(MORSE_enum norm, MORSE_desc_t *A); -#ifdef COMPLEX double MORSE_zlanhe_Tile(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A); -#endif double MORSE_zlansy_Tile(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A); @@ -1131,10 +1121,8 @@ int MORSE_zlaset_Tile(MORSE_enum uplo, MORSE_Complex64_t alpha, int MORSE_zlauum_Tile(MORSE_enum uplo, MORSE_desc_t *A); -#ifdef COMPLEX int MORSE_zplghe_Tile(double bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed); -#endif int MORSE_zplgsy_Tile(MORSE_Complex64_t bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed ); @@ -1258,7 +1246,6 @@ int MORSE_zgetrs_nopiv_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX int MORSE_zhemm_Tile_Async(MORSE_enum side, MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t beta, @@ -1276,7 +1263,6 @@ int MORSE_zher2k_Tile_Async(MORSE_enum uplo, MORSE_enum trans, MORSE_desc_t *B, double beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request); -#endif int MORSE_zlacpy_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, @@ -1286,12 +1272,10 @@ int MORSE_zlange_Tile_Async(MORSE_enum norm, MORSE_desc_t *A, double *value, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX int MORSE_zlanhe_Tile_Async(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *value, MORSE_sequence_t *sequence, MORSE_request_t *request); -#endif int MORSE_zlansy_Tile_Async(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *value, @@ -1312,12 +1296,10 @@ int MORSE_zlauum_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX int MORSE_zplghe_Tile_Async(double bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed, MORSE_sequence_t *sequence, MORSE_request_t *request ); -#endif int MORSE_zplgsy_Tile_Async(MORSE_Complex64_t bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed, diff --git a/include/chameleon/morse_tasks_z.h b/include/chameleon/morse_tasks_z.h index 57ad2989b1f99108ec49cdb298b4137737acc767..d9a768d4771a18de8279f6a36ff1601a0fc49d1f 100644 --- a/include/chameleon/morse_tasks_z.h +++ b/include/chameleon/morse_tasks_z.h @@ -27,7 +27,6 @@ #ifndef _MORSE_TASKS_Z_H_ #define _MORSE_TASKS_Z_H_ -#define COMPLEX /** * Declarations of QUARK wrappers (called by MORSE) - alphabetical order @@ -195,7 +194,6 @@ void MORSE_TASK_zlange(const MORSE_option_t *options, void MORSE_TASK_zlange_max(const MORSE_option_t *options, const MORSE_desc_t *A, int Am, int An, const MORSE_desc_t *B, int Bm, int Bn); -#ifdef COMPLEX void MORSE_TASK_zhessq( const MORSE_option_t *options, MORSE_enum uplo, int n, const MORSE_desc_t *A, int Am, int An, int lda, @@ -204,7 +202,6 @@ void MORSE_TASK_zlanhe(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); -#endif 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, @@ -468,6 +465,4 @@ void MORSE_TASK_zbuild( const MORSE_option_t *options, const MORSE_desc_t *A, int Am, int An, int lda, void *user_data, void* user_build_callback ); -#undef COMPLEX - #endif diff --git a/include/chameleon/morse_z.h b/include/chameleon/morse_z.h index ff3d6dd4ca37c3055e9686ed2b385867b7a09b51..b05bfa5a5a5fb38c60497f031a20fba1a4e41c99 100644 --- a/include/chameleon/morse_z.h +++ b/include/chameleon/morse_z.h @@ -27,9 +27,6 @@ #ifndef _MORSE_Z_H_ #define _MORSE_Z_H_ -#undef REAL -#define COMPLEX - BEGIN_C_DECLS /** @@ -56,11 +53,9 @@ int MORSE_zgetrf_nopiv(int M, int N, MORSE_Complex64_t *A, int LDA); //int MORSE_zgetrs(MORSE_enum trans, int N, int NRHS, MORSE_Complex64_t *A, int LDA, int *IPIV, MORSE_Complex64_t *B, int LDB); int MORSE_zgetrs_incpiv(MORSE_enum trans, int N, int NRHS, MORSE_Complex64_t *A, int LDA, MORSE_desc_t *descL, int *IPIV, MORSE_Complex64_t *B, int LDB); int MORSE_zgetrs_nopiv(MORSE_enum trans, int N, int NRHS, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB); -#ifdef COMPLEX int MORSE_zhemm(MORSE_enum side, MORSE_enum uplo, int M, int N, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, MORSE_Complex64_t beta, MORSE_Complex64_t *C, int LDC); int MORSE_zherk(MORSE_enum uplo, MORSE_enum trans, int N, int K, double alpha, MORSE_Complex64_t *A, int LDA, double beta, MORSE_Complex64_t *C, int LDC); int MORSE_zher2k(MORSE_enum uplo, MORSE_enum trans, int N, int K, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, double beta, MORSE_Complex64_t *C, int LDC); -#endif //int MORSE_zheev(MORSE_enum jobz, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, double *W, MORSE_desc_t *descT, MORSE_Complex64_t *Q, int LDQ); int MORSE_zheevd(MORSE_enum jobz, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, double *W, MORSE_desc_t *descT); //int MORSE_zhegv(MORSE_enum itype, MORSE_enum jobz, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, double *W, MORSE_desc_t *descT, MORSE_Complex64_t *Q, int LDQ); @@ -69,9 +64,7 @@ int MORSE_zheevd(MORSE_enum jobz, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int MORSE_zhetrd(MORSE_enum jobz, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, double *D, double *E, MORSE_desc_t *descT, MORSE_Complex64_t *Q, int LDQ); int MORSE_zlacpy(MORSE_enum uplo, int M, int N, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB); double MORSE_zlange(MORSE_enum norm, int M, int N, MORSE_Complex64_t *A, int LDA); -#ifdef COMPLEX double MORSE_zlanhe(MORSE_enum norm, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA); -#endif double MORSE_zlansy(MORSE_enum norm, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA); double MORSE_zlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag, int M, int N, MORSE_Complex64_t *A, int LDA); int MORSE_zlascal(MORSE_enum uplo, int M, int N, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA); @@ -79,9 +72,7 @@ int MORSE_zlaset(MORSE_enum uplo, int M, int N, MORSE_Complex64_t alpha, MORSE_C //int MORSE_zlaswp(int N, MORSE_Complex64_t *A, int LDA, int K1, int K2, int *IPIV, int INCX); //int MORSE_zlaswpc(int N, MORSE_Complex64_t *A, int LDA, int K1, int K2, int *IPIV, int INCX); int MORSE_zlauum(MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA); -#ifdef COMPLEX int MORSE_zplghe( double bump, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, unsigned long long int seed ); -#endif int MORSE_zplgsy( MORSE_Complex64_t bump, MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, unsigned long long int seed ); int MORSE_zplrnt( int M, int N, MORSE_Complex64_t *A, int LDA, unsigned long long int seed ); int MORSE_zposv(MORSE_enum uplo, int N, int NRHS, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB); @@ -135,11 +126,9 @@ int MORSE_zgetrf_nopiv_Tile(MORSE_desc_t *A); //int MORSE_zgetrs_Tile(MORSE_enum trans, MORSE_desc_t *A, int *IPIV, MORSE_desc_t *B); int MORSE_zgetrs_incpiv_Tile(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV, MORSE_desc_t *B); int MORSE_zgetrs_nopiv_Tile(MORSE_desc_t *A, MORSE_desc_t *B); -#ifdef COMPLEX int MORSE_zhemm_Tile(MORSE_enum side, MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t beta, MORSE_desc_t *C); int MORSE_zherk_Tile(MORSE_enum uplo, MORSE_enum trans, double alpha, MORSE_desc_t *A, double beta, MORSE_desc_t *C); int MORSE_zher2k_Tile(MORSE_enum uplo, MORSE_enum trans, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, double beta, MORSE_desc_t *C); -#endif //int MORSE_zheev_Tile(MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, double *W, MORSE_desc_t *T, MORSE_Complex64_t *Q, int LDQ); int MORSE_zheevd_Tile(MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, double *W, MORSE_desc_t *T); //int MORSE_zhegv_Tile( MORSE_enum itype, MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, double *W, MORSE_desc_t *T, MORSE_desc_t *Q); @@ -148,9 +137,7 @@ int MORSE_zheevd_Tile(MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, double int MORSE_zhetrd_Tile(MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, double *D, double *E, MORSE_desc_t *T, MORSE_Complex64_t *Q, int LDQ); int MORSE_zlacpy_Tile(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B); double MORSE_zlange_Tile(MORSE_enum norm, MORSE_desc_t *A); -#ifdef COMPLEX double MORSE_zlanhe_Tile(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A); -#endif double MORSE_zlansy_Tile(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A); double MORSE_zlantr_Tile(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag, MORSE_desc_t *A); int MORSE_zlascal_Tile(MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_desc_t *A); @@ -158,9 +145,7 @@ int MORSE_zlaset_Tile(MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_Complex64_ //int MORSE_zlaswp_Tile(MORSE_desc_t *A, int K1, int K2, int *IPIV, int INCX); //int MORSE_zlaswpc_Tile(MORSE_desc_t *A, int K1, int K2, int *IPIV, int INCX); int MORSE_zlauum_Tile(MORSE_enum uplo, MORSE_desc_t *A); -#ifdef COMPLEX int MORSE_zplghe_Tile(double bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed ); -#endif int MORSE_zplgsy_Tile(MORSE_Complex64_t bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed ); int MORSE_zplrnt_Tile(MORSE_desc_t *A, unsigned long long int seed ); int MORSE_zposv_Tile(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B); @@ -211,11 +196,9 @@ int MORSE_zgetrf_nopiv_Tile_Async(MORSE_desc_t *A, MORSE_sequence_t *sequence, M //int MORSE_zgetrs_Tile_Async(MORSE_enum trans, MORSE_desc_t *A, int *IPIV, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zgetrs_incpiv_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zgetrs_nopiv_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX int MORSE_zhemm_Tile_Async(MORSE_enum side, MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zherk_Tile_Async(MORSE_enum uplo, MORSE_enum trans, double alpha, MORSE_desc_t *A, double beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zher2k_Tile_Async(MORSE_enum uplo, MORSE_enum trans, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, double beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request); -#endif //int MORSE_zheev_Tile_Async(MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, double *W, MORSE_desc_t *T, MORSE_Complex64_t *Q, int LDQ, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, double *W, MORSE_desc_t *T, MORSE_sequence_t *sequence, MORSE_request_t *request); //int MORSE_zhegv_Tile_Async( MORSE_enum itype, MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, double *W, MORSE_desc_t *T, MORSE_desc_t *Q, MORSE_sequence_t *sequence, MORSE_request_t *request); @@ -224,9 +207,7 @@ int MORSE_zheevd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, d int MORSE_zhetrd_Tile_Async(MORSE_enum jobz, MORSE_enum uplo, MORSE_desc_t *A, double *D, double *E, MORSE_desc_t *T, MORSE_Complex64_t *Q, int LDQ, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zlacpy_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zlange_Tile_Async(MORSE_enum norm, MORSE_desc_t *A, double *value, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX int MORSE_zlanhe_Tile_Async(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *value, MORSE_sequence_t *sequence, MORSE_request_t *request); -#endif int MORSE_zlansy_Tile_Async(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *value, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zlantr_Tile_Async(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag, MORSE_desc_t *A, double *value, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zlascal_Tile_Async(MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request); @@ -234,9 +215,7 @@ int MORSE_zlaset_Tile_Async(MORSE_enum uplo, MORSE_Complex64_t alpha, MORSE_Comp //int MORSE_zlaswp_Tile_Async(MORSE_desc_t *A, int K1, int K2, int *IPIV, int INCX, MORSE_sequence_t *sequence, MORSE_request_t *request); //int MORSE_zlaswpc_Tile_Async(MORSE_desc_t *A, int K1, int K2, int *IPIV, int INCX, MORSE_sequence_t *sequence, MORSE_request_t *request); int MORSE_zlauum_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request); -#ifdef COMPLEX int MORSE_zplghe_Tile_Async(double bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed, MORSE_sequence_t *sequence, MORSE_request_t *request ); -#endif int MORSE_zplgsy_Tile_Async(MORSE_Complex64_t bump, MORSE_enum uplo, MORSE_desc_t *A, unsigned long long int seed, MORSE_sequence_t *sequence, MORSE_request_t *request ); int MORSE_zplrnt_Tile_Async(MORSE_desc_t *A, unsigned long long int seed, MORSE_sequence_t *sequence, MORSE_request_t *request ); int MORSE_zposv_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request); @@ -354,6 +333,4 @@ int MORSE_zbuild_Tile_Async(MORSE_enum uplo, MORSE_desc_t *A, void *user_data, v END_C_DECLS -#undef COMPLEX - #endif diff --git a/runtime/starpu/codelets/codelet_ztslqt.c b/runtime/starpu/codelets/codelet_ztslqt.c index ee9b2cc5647dada772e5229ef9d08a477a5ad116..f99360108a02f5d7ec3fb0f240fcd56785306992 100644 --- a/runtime/starpu/codelets/codelet_ztslqt.c +++ b/runtime/starpu/codelets/codelet_ztslqt.c @@ -25,8 +25,6 @@ */ #include "chameleon_starpu.h" #include "runtime_codelet_z.h" -#undef REAL -#define COMPLEX /** * diff --git a/runtime/starpu/codelets/codelet_ztsqrt.c b/runtime/starpu/codelets/codelet_ztsqrt.c index 1f82cf8fc6189e6b897893f9cd97728bdd852925..00c75abd7ba0e8b066f6ef05e80c711af818b9eb 100644 --- a/runtime/starpu/codelets/codelet_ztsqrt.c +++ b/runtime/starpu/codelets/codelet_ztsqrt.c @@ -25,8 +25,6 @@ */ #include "chameleon_starpu.h" #include "runtime_codelet_z.h" -#undef REAL -#define COMPLEX /** * diff --git a/testing/testing_zauxiliary.c b/testing/testing_zauxiliary.c index cf2db1c2c4d82b719048ee84f87e470b1fe4668f..eebc0fe5d8cf7ffc3928eb0fc0ef6d14e7dc8213 100644 --- a/testing/testing_zauxiliary.c +++ b/testing/testing_zauxiliary.c @@ -28,10 +28,6 @@ #include <sys/resource.h> #endif #include <morse.h> -#undef REAL -#define COMPLEX -#undef SINGLE -#define DOUBLE #include "testing_zauxiliary.h" int IONE = 1; @@ -199,7 +195,7 @@ int main (int argc, char **argv) else if ( strcmp(func, "GEMM") == 0 ) { info += testing_zgemm( argc, argv ); } -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) else if ( strcmp(func, "HEMM") == 0 ) { info += testing_zhemm( argc, argv ); } diff --git a/testing/testing_zgeadd.c b/testing/testing_zgeadd.c index b6744ecd6c286b62ce22bfa4eee48f6730121080..ae417b1f92e3f543b606a4d7e782c0fb1b3106f0 100644 --- a/testing/testing_zgeadd.c +++ b/testing/testing_zgeadd.c @@ -35,9 +35,6 @@ #include <mpi.h> #endif -#undef REAL -#define COMPLEX - static int check_tr_solution(MORSE_enum uplo, MORSE_enum trans, int M, int N, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t beta, MORSE_Complex64_t *Bref, MORSE_Complex64_t *Bmorse, int LDB); @@ -105,7 +102,7 @@ int testing_zgeadd(int argc, char **argv) LAPACKE_zlarnv_work(IONE, ISEED, LDAxN, A); LAPACKE_zlarnv_work(IONE, ISEED, LDBxN, B); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) for (t=0; t<3; t++) { #else for (t=0; t<2; t++) { @@ -143,7 +140,7 @@ int testing_zgeadd(int argc, char **argv) LAPACKE_zlarnv_work(IONE, ISEED, LDAxN, A); LAPACKE_zlarnv_work(IONE, ISEED, LDBxN, B); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) for (t=0; t<3; t++) { #else for (t=0; t<2; t++) { diff --git a/testing/testing_zgels.c b/testing/testing_zgels.c index 51859d37cc0545a8fc6e06112450c34f64d074e1..1259502af39c374e83d1e28936c80cf804b9cb0f 100644 --- a/testing/testing_zgels.c +++ b/testing/testing_zgels.c @@ -34,9 +34,6 @@ #include <coreblas.h> #include "testing_zauxiliary.h" -#undef REAL -#define COMPLEX - enum blas_order_type { blas_rowmajor = 101, blas_colmajor = 102 }; diff --git a/testing/testing_zgels_hqr.c b/testing/testing_zgels_hqr.c index 97c32a77107601dfab5f3574f8a7cac8c1b88d3e..9583e541381557825e036aeff70040ca099372ed 100644 --- a/testing/testing_zgels_hqr.c +++ b/testing/testing_zgels_hqr.c @@ -30,9 +30,6 @@ #include <coreblas.h> #include "testing_zauxiliary.h" -#undef REAL -#define COMPLEX - static int check_orthogonality(int, int, int, MORSE_Complex64_t*, double); static int check_factorization(int, int, MORSE_Complex64_t*, MORSE_Complex64_t*, int, MORSE_Complex64_t*, double); static int check_solution(int, int, int, MORSE_Complex64_t*, int, MORSE_Complex64_t*, MORSE_Complex64_t*, int, double); diff --git a/testing/testing_zgels_systolic.c b/testing/testing_zgels_systolic.c index 9726b5a59ec7414566b0fa24e5070f8e14730bbf..600c3b142842caac9a54899dfbbe9b62c471558a 100644 --- a/testing/testing_zgels_systolic.c +++ b/testing/testing_zgels_systolic.c @@ -30,9 +30,6 @@ #include <coreblas.h> #include "testing_zauxiliary.h" -#undef REAL -#define COMPLEX - static int check_orthogonality(int, int, int, MORSE_Complex64_t*, double); static int check_factorization(int, int, MORSE_Complex64_t*, MORSE_Complex64_t*, int, MORSE_Complex64_t*, double); static int check_solution(int, int, int, MORSE_Complex64_t*, int, MORSE_Complex64_t*, MORSE_Complex64_t*, int, double); diff --git a/testing/testing_zgemm.c b/testing/testing_zgemm.c index ec2948c5154e2b2ca31ed5217b2305bf906a1e5d..44336fef78a4d24eb5a5fab8ababea132ba58492 100644 --- a/testing/testing_zgemm.c +++ b/testing/testing_zgemm.c @@ -35,9 +35,6 @@ #include <mpi.h> #endif -#undef REAL -#define COMPLEX - static int check_solution(MORSE_enum transA, MORSE_enum transB, int M, int N, int K, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, @@ -113,7 +110,7 @@ int testing_zgemm(int argc, char **argv) LAPACKE_zlarnv_work(IONE, ISEED, LDBxN, B); LAPACKE_zlarnv_work(IONE, ISEED, LDCxN, C); -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) for (ta=0; ta<3; ta++) { for (tb=0; tb<3; tb++) { #else diff --git a/testing/testing_zgeqrf_qdwh.c b/testing/testing_zgeqrf_qdwh.c index c669f21675c0641346203fd777fd6c31cb997bc5..6047451cb4d33e95b62f5f548dc8681d2a9f64cb 100644 --- a/testing/testing_zgeqrf_qdwh.c +++ b/testing/testing_zgeqrf_qdwh.c @@ -35,9 +35,6 @@ #include <coreblas/coreblas_z.h> #include "testing_zauxiliary.h" -#undef REAL -#define COMPLEX - static int check_orthogonality(int, int, const MORSE_Complex64_t*, int, double); static int check_factorization(int, int, const MORSE_Complex64_t*, int, const MORSE_Complex64_t*, int, MORSE_Complex64_t*, int, double); diff --git a/testing/testing_zher2k.c b/testing/testing_zher2k.c index f204121124770f6196afa46944be6ffec7ac609c..d53ba235ac23c1465b9a49435c1259d6e4d6cc5a 100644 --- a/testing/testing_zher2k.c +++ b/testing/testing_zher2k.c @@ -33,7 +33,7 @@ #include "testing_zauxiliary.h" static int check_solution(MORSE_enum uplo, MORSE_enum trans, int N, int K, - MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, + MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, double beta, MORSE_Complex64_t *Cref, MORSE_Complex64_t *Cmorse, int LDC); @@ -112,12 +112,12 @@ int testing_zher2k(int argc, char **argv) memcpy(Cinit, C, LDCxN*sizeof(MORSE_Complex64_t)); memcpy(Cfinal, C, LDCxN*sizeof(MORSE_Complex64_t)); - + /* MORSE ZHER2K */ MORSE_zher2k(uplo[u], trans[t], N, K, alpha, A, LDA, B, LDB, beta, Cfinal, LDC); /* Check the solution */ - info_solution = check_solution(uplo[u], trans[t], N, K, + info_solution = check_solution(uplo[u], trans[t], N, K, alpha, A, LDA, B, LDB, beta, Cinit, Cfinal, LDC); if (info_solution == 0) { @@ -156,16 +156,16 @@ static int check_solution(MORSE_enum uplo, MORSE_enum trans, int N, int K, double *work = (double *)malloc(max(N, K)* sizeof(double)); beta_const = -1.0; - Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', - (trans == MorseNoTrans) ? N : K, + Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', + (trans == MorseNoTrans) ? N : K, (trans == MorseNoTrans) ? K : N, A, LDA, work); - Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', - (trans == MorseNoTrans) ? N : K, + Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', + (trans == MorseNoTrans) ? N : K, (trans == MorseNoTrans) ? K : N, B, LDB, work); Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', N, N, Cref, LDC, work); Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', N, N, Cmorse, LDC, work); - cblas_zher2k(CblasColMajor, (CBLAS_UPLO)uplo, (CBLAS_TRANSPOSE)trans, + cblas_zher2k(CblasColMajor, (CBLAS_UPLO)uplo, (CBLAS_TRANSPOSE)trans, N, K, CBLAS_SADDR(alpha), A, LDA, B, LDB, (beta), Cref, LDC); Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', N, N, Cref, LDC, work); @@ -175,7 +175,7 @@ static int check_solution(MORSE_enum uplo, MORSE_enum trans, int N, int K, Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', N, N, Cref, LDC, work); eps = LAPACKE_dlamch_work('e'); - + printf("Rnorm %e, Anorm %e, Cinitnorm %e, Cmorsenorm %e, Clapacknorm %e\n", Rnorm, Anorm, Cinitnorm, Cmorsenorm, Clapacknorm); diff --git a/testing/testing_zlange.c b/testing/testing_zlange.c index 8921f7c0ed93d9bb65c1b6e183b42727ae4b345f..859393db9f6e3f775a9e69da22bf3fc3e29a39a3 100644 --- a/testing/testing_zlange.c +++ b/testing/testing_zlange.c @@ -31,9 +31,6 @@ #include <coreblas.h> #include "testing_zauxiliary.h" -#undef REAL -#define COMPLEX - int testing_zlange(int argc, char **argv) { int hres = 0; @@ -111,50 +108,50 @@ int testing_zlange(int argc, char **argv) } - #ifdef COMPLEX - /* MORSE ZLANTR */ - for(n=1; n<3; n++) { - for(u=0; u<2; u++) { - int d; - for(d=0; d<2; d++) { - normmorse = MORSE_zlantr(norm[n], uplo[u], diag[d], M, N, A, LDA); - normlapack = LAPACKE_zlantr_work(LAPACK_COL_MAJOR, morse_lapack_const(norm[n]), morse_lapack_const(uplo[u]), - morse_lapack_const(diag[d]), M, N, A, LDA, work); - printf("LAPACK %e, CHAMELEON %e\n", normlapack, normmorse); - - result = fabs(normmorse - normlapack) / (normlapack * eps); - switch(norm[n]) { - case MorseMaxNorm: - /* result should be perfectly equal */ - break; - case MorseInfNorm: - /* Sum order on the line can differ */ - result = result / (double)N; - break; - case MorseOneNorm: - /* Sum order on the column can differ */ - result = result / (double)M; - break; - case MorseFrobeniusNorm: - /* Sum oreder on every element can differ */ - result = result / ((double)M * (double)N); - break; - } - - printf("***************************************************\n"); - if ( result < 1. ) { - printf(" ---- TESTING ZLANTR (%s, %s, %s)......... PASSED !\n", - normstr[n], uplostr[u], diagstr[d]); - } - else { - printf(" - TESTING ZLANTR (%s, %s, %s)... FAILED !\n", - normstr[n], uplostr[u], diagstr[d]); - } - printf("***************************************************\n"); +#if defined(PRECISION_z) || defined(PRECISION_c) + /* MORSE ZLANTR */ + for(n=1; n<3; n++) { + for(u=0; u<2; u++) { + int d; + for(d=0; d<2; d++) { + normmorse = MORSE_zlantr(norm[n], uplo[u], diag[d], M, N, A, LDA); + normlapack = LAPACKE_zlantr_work(LAPACK_COL_MAJOR, morse_lapack_const(norm[n]), morse_lapack_const(uplo[u]), + morse_lapack_const(diag[d]), M, N, A, LDA, work); + printf("LAPACK %e, CHAMELEON %e\n", normlapack, normmorse); + + result = fabs(normmorse - normlapack) / (normlapack * eps); + switch(norm[n]) { + case MorseMaxNorm: + /* result should be perfectly equal */ + break; + case MorseInfNorm: + /* Sum order on the line can differ */ + result = result / (double)N; + break; + case MorseOneNorm: + /* Sum order on the column can differ */ + result = result / (double)M; + break; + case MorseFrobeniusNorm: + /* Sum oreder on every element can differ */ + result = result / ((double)M * (double)N); + break; } + + printf("***************************************************\n"); + if ( result < 1. ) { + printf(" ---- TESTING ZLANTR (%s, %s, %s)......... PASSED !\n", + normstr[n], uplostr[u], diagstr[d]); + } + else { + printf(" - TESTING ZLANTR (%s, %s, %s)... FAILED !\n", + normstr[n], uplostr[u], diagstr[d]); + } + printf("***************************************************\n"); } } - #endif + } +#endif /* MORSE ZLANSY */ for(n=0; n<4; n++) { @@ -193,51 +190,51 @@ int testing_zlange(int argc, char **argv) } } - #ifdef COMPLEX - /* MORSE ZLANHE */ - { - int j; - for (j=0; j<min(M,N); j++) { +#if defined(PRECISION_z) || defined(PRECISION_c) + /* MORSE ZLANHE */ + { + int j; + for (j=0; j<min(M,N); j++) { A[j*LDA+j] -= I*cimag(A[j*LDA+j]); - } } + } - for(n=0; n<4; n++) { - for(u=0; u<2; u++) { - normmorse = MORSE_zlanhe(norm[n], uplo[u], min(M,N), A, LDA); - normlapack = LAPACKE_zlanhe_work(LAPACK_COL_MAJOR, morse_lapack_const(norm[n]), morse_lapack_const(uplo[u]), min(M,N), A, LDA, work); - printf("LAPACK %e, CHAMELEON %e\n", normlapack, normmorse); + for(n=0; n<4; n++) { + for(u=0; u<2; u++) { + normmorse = MORSE_zlanhe(norm[n], uplo[u], min(M,N), A, LDA); + normlapack = LAPACKE_zlanhe_work(LAPACK_COL_MAJOR, morse_lapack_const(norm[n]), morse_lapack_const(uplo[u]), min(M,N), A, LDA, work); + printf("LAPACK %e, CHAMELEON %e\n", normlapack, normmorse); - result = fabs(normmorse - normlapack) / (normlapack * eps); - switch(norm[n]) { - case MorseMaxNorm: - /* result should be perfectly equal */ - break; - case MorseInfNorm: - /* Sum order on the line can differ */ - result = result / (double)N; - break; - case MorseOneNorm: - /* Sum order on the column can differ */ - result = result / (double)M; - break; - case MorseFrobeniusNorm: - /* Sum oreder on every element can differ */ - result = result / ((double)M * (double)N); - break; - } + result = fabs(normmorse - normlapack) / (normlapack * eps); + switch(norm[n]) { + case MorseMaxNorm: + /* result should be perfectly equal */ + break; + case MorseInfNorm: + /* Sum order on the line can differ */ + result = result / (double)N; + break; + case MorseOneNorm: + /* Sum order on the column can differ */ + result = result / (double)M; + break; + case MorseFrobeniusNorm: + /* Sum oreder on every element can differ */ + result = result / ((double)M * (double)N); + break; + } - printf("***************************************************\n"); - if ( result < 1. ) { - printf(" ---- TESTING ZLANHE (%s, %s)......... PASSED !\n", normstr[n], uplostr[u]); - } - else { - printf(" - TESTING ZLANHE (%s, %s)... FAILED !\n", normstr[n], uplostr[u]); - } - printf("***************************************************\n"); + printf("***************************************************\n"); + if ( result < 1. ) { + printf(" ---- TESTING ZLANHE (%s, %s)......... PASSED !\n", normstr[n], uplostr[u]); + } + else { + printf(" - TESTING ZLANHE (%s, %s)... FAILED !\n", normstr[n], uplostr[u]); } + printf("***************************************************\n"); } - #endif + } +#endif free(A); free(work); diff --git a/testing/testing_zpemv.c b/testing/testing_zpemv.c index a816862ddccb8d07a48fae948a98c1a025a7539d..9565e8e2f51be9a64c56e564a9c18ac7e123a67f 100644 --- a/testing/testing_zpemv.c +++ b/testing/testing_zpemv.c @@ -31,9 +31,6 @@ #include <coreblas.h> #include "testing_zauxiliary.h" -#define COMPLEX -#undef REAL - /*-------------------------------------------------------------- * Check the pemv */ @@ -164,7 +161,7 @@ int testing_zpemv(int argc, char **argv) } /* Colwise ConjTrans & Rowwise NoTrans */ -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) for (t=0; t<3; t++) #else for (t=0; t<2; t++) diff --git a/testing/testing_zsyr2k.c b/testing/testing_zsyr2k.c index c4f1a8a4e80d16fd34309560aca2b8f7451cbf55..eec56cccfedb8b35720f6d483124a47aee7481e9 100644 --- a/testing/testing_zsyr2k.c +++ b/testing/testing_zsyr2k.c @@ -33,7 +33,7 @@ #include "testing_zauxiliary.h" static int check_solution(MORSE_enum uplo, MORSE_enum trans, int N, int K, - MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, + MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, MORSE_Complex64_t *B, int LDB, MORSE_Complex64_t beta, MORSE_Complex64_t *Cref, MORSE_Complex64_t *Cmorse, int LDC); @@ -112,12 +112,12 @@ int testing_zsyr2k(int argc, char **argv) memcpy(Cinit, C, LDCxN*sizeof(MORSE_Complex64_t)); memcpy(Cfinal, C, LDCxN*sizeof(MORSE_Complex64_t)); - + /* MORSE ZSYR2K */ MORSE_zsyr2k(uplo[u], trans[t], N, K, alpha, A, LDA, B, LDB, beta, Cfinal, LDC); /* Check the solution */ - info_solution = check_solution(uplo[u], trans[t], N, K, + info_solution = check_solution(uplo[u], trans[t], N, K, alpha, A, LDA, B, LDB, beta, Cinit, Cfinal, LDC); if (info_solution == 0) { @@ -156,16 +156,16 @@ static int check_solution(MORSE_enum uplo, MORSE_enum trans, int N, int K, double *work = (double *)malloc(max(N, K)* sizeof(double)); beta_const = -1.0; - Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', - (trans == MorseNoTrans) ? N : K, + Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', + (trans == MorseNoTrans) ? N : K, (trans == MorseNoTrans) ? K : N, A, LDA, work); - Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', - (trans == MorseNoTrans) ? N : K, + Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', + (trans == MorseNoTrans) ? N : K, (trans == MorseNoTrans) ? K : N, B, LDB, work); Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', N, N, Cref, LDC, work); Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', N, N, Cmorse, LDC, work); - cblas_zsyr2k(CblasColMajor, (CBLAS_UPLO)uplo, (CBLAS_TRANSPOSE)trans, + cblas_zsyr2k(CblasColMajor, (CBLAS_UPLO)uplo, (CBLAS_TRANSPOSE)trans, N, K, CBLAS_SADDR(alpha), A, LDA, B, LDB, CBLAS_SADDR(beta), Cref, LDC); Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', N, N, Cref, LDC, work); @@ -175,7 +175,7 @@ static int check_solution(MORSE_enum uplo, MORSE_enum trans, int N, int K, Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, 'I', N, N, Cref, LDC, work); eps = LAPACKE_dlamch_work('e'); - + printf("Rnorm %e, Anorm %e, Cinitnorm %e, Cmorsenorm %e, Clapacknorm %e\n", Rnorm, Anorm, Cinitnorm, Cmorsenorm, Clapacknorm); diff --git a/testing/testing_ztrmm.c b/testing/testing_ztrmm.c index a6a0586354a3acfe2444f4853dcf31a3f3007a35..4d13517b7b68d0af16333d4e3162a5e5975cc3e1 100644 --- a/testing/testing_ztrmm.c +++ b/testing/testing_ztrmm.c @@ -32,9 +32,6 @@ #include <coreblas.h> #include "testing_zauxiliary.h" -#undef REAL -#define COMPLEX - static int check_solution(MORSE_enum side, MORSE_enum uplo, MORSE_enum trans, MORSE_enum diag, int M, int N, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, @@ -103,7 +100,7 @@ int testing_ztrmm(int argc, char **argv) for (s=0; s<2; s++) { for (u=0; u<2; u++) { -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) for (t=0; t<3; t++) { #else for (t=0; t<2; t++) { diff --git a/testing/testing_ztrsm.c b/testing/testing_ztrsm.c index ba6110955e7575d89580bceb60f6c56fda42c126..4a19927360bcb76d6a1a7f30f07874a7933e23c1 100644 --- a/testing/testing_ztrsm.c +++ b/testing/testing_ztrsm.c @@ -32,9 +32,6 @@ #include <coreblas.h> #include "testing_zauxiliary.h" -#undef REAL -#define COMPLEX - static int check_solution(MORSE_enum side, MORSE_enum uplo, MORSE_enum trans, MORSE_enum diag, int M, int N, MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA, @@ -103,7 +100,7 @@ int testing_ztrsm(int argc, char **argv) for (s=0; s<2; s++) { for (u=0; u<2; u++) { -#ifdef COMPLEX +#if defined(PRECISION_z) || defined(PRECISION_c) for (t=0; t<3; t++) { #else for (t=0; t<2; t++) {