Commit 3ca5c222 authored by PRUVOST Florent's avatar PRUVOST Florent

avoid problem of compatibility with MAGMA with lapack_const

parent 80e0818c
......@@ -145,7 +145,7 @@
* Global array of LAPACK constants
**/
extern char *morse_lapack_constants[];
#define lapack_const(morse_const) morse_lapack_constants[morse_const][0]
#define morse_lapack_const(morse_const) morse_lapack_constants[morse_const][0]
#ifdef __cplusplus
extern "C" {
......
......@@ -136,8 +136,8 @@ int CORE_zgelqt(int M, int N, int IB,
&A[LDA*i+i], LDA, &TAU[i], WORK);
LAPACKE_zlarft_work(LAPACK_COL_MAJOR,
lapack_const(MorseForward),
lapack_const(MorseRowwise),
morse_lapack_const(MorseForward),
morse_lapack_const(MorseRowwise),
N-i, sb,
&A[LDA*i+i], LDA, &TAU[i],
&T[LDT*i], LDT);
......@@ -145,10 +145,10 @@ int CORE_zgelqt(int M, int N, int IB,
if (M > i+sb) {
LAPACKE_zlarfb_work(
LAPACK_COL_MAJOR,
lapack_const(MorseRight),
lapack_const(MorseNoTrans),
lapack_const(MorseForward),
lapack_const(MorseRowwise),
morse_lapack_const(MorseRight),
morse_lapack_const(MorseNoTrans),
morse_lapack_const(MorseForward),
morse_lapack_const(MorseRowwise),
M-i-sb, N-i, sb,
&A[LDA*i+i], LDA,
&T[LDT*i], LDT,
......
......@@ -137,8 +137,8 @@ int CORE_zgeqrt(int M, int N, int IB,
&A[LDA*i+i], LDA, &TAU[i], WORK);
LAPACKE_zlarft_work(LAPACK_COL_MAJOR,
lapack_const(MorseForward),
lapack_const(MorseColumnwise),
morse_lapack_const(MorseForward),
morse_lapack_const(MorseColumnwise),
M-i, sb,
&A[LDA*i+i], LDA, &TAU[i],
&T[LDT*i], LDT);
......@@ -146,10 +146,10 @@ int CORE_zgeqrt(int M, int N, int IB,
if (N > i+sb) {
LAPACKE_zlarfb_work(
LAPACK_COL_MAJOR,
lapack_const(MorseLeft),
lapack_const(MorseConjTrans),
lapack_const(MorseForward),
lapack_const(MorseColumnwise),
morse_lapack_const(MorseLeft),
morse_lapack_const(MorseConjTrans),
morse_lapack_const(MorseForward),
morse_lapack_const(MorseColumnwise),
M-i, N-i-sb, sb,
&A[LDA*i+i], LDA,
&T[LDT*i], LDT,
......
......@@ -101,11 +101,11 @@ int CORE_zgesplit(MORSE_enum side, MORSE_enum diag,
}
LAPACKE_zlacpy_work(LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, A, LDA, B, LDB);
LAPACKE_zlaset_work(LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, 0., 1., A, LDA);
return MORSE_SUCCESS;
......
......@@ -43,7 +43,7 @@ void CORE_zlacpy(MORSE_enum uplo, int M, int N,
{
LAPACKE_zlacpy_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, A, LDA, B, LDB);
}
......
......@@ -84,6 +84,6 @@ void CORE_zlange(int norm, int M, int N,
{
*normA = LAPACKE_zlange_work(
LAPACK_COL_MAJOR,
lapack_const(norm),
morse_lapack_const(norm),
M, N, A, LDA, work);
}
......@@ -86,6 +86,6 @@ void CORE_zlanhe(int norm, MORSE_enum uplo, int N,
{
*normA = LAPACKE_zlanhe_work(
LAPACK_COL_MAJOR,
lapack_const(norm), lapack_const(uplo),
morse_lapack_const(norm), morse_lapack_const(uplo),
N, A, LDA, work);
}
......@@ -86,6 +86,6 @@ void CORE_zlansy(int norm, MORSE_enum uplo, int N,
{
*normA = LAPACKE_zlansy_work(
LAPACK_COL_MAJOR,
lapack_const(norm), lapack_const(uplo),
morse_lapack_const(norm), morse_lapack_const(uplo),
N, A, LDA, work);
}
......@@ -98,9 +98,9 @@ void CORE_zlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
#if defined(LAPACKE_CORRECT_DLANTR)
*normA = LAPACKE_zlantr_work(
LAPACK_COL_MAJOR,
lapack_const(norm),
lapack_const(uplo),
lapack_const(diag),
morse_lapack_const(norm),
morse_lapack_const(uplo),
morse_lapack_const(diag),
M, N, A, LDA, work);
#else
const MORSE_Complex64_t *tmpA;
......
......@@ -73,7 +73,7 @@ void CORE_zlaset(MORSE_enum uplo, int M, int N,
{
LAPACKE_zlaset_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, alpha, beta, A, LDA);
}
......
......@@ -71,19 +71,19 @@ void CORE_zlaset2(MORSE_enum uplo, int M, int N,
if (uplo == MorseUpper) {
LAPACKE_zlaset_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N-1, alpha, alpha, A+LDA, LDA);
}
else if (uplo == MorseLower) {
LAPACKE_zlaset_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M-1, N, alpha, alpha, A+1, LDA);
}
else {
LAPACKE_zlaset_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, alpha, alpha, A, LDA);
}
}
......
......@@ -39,7 +39,7 @@
void CORE_zlauum(MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA)
{
LAPACKE_zlauum_work(LAPACK_COL_MAJOR, lapack_const(uplo), N, A, LDA );
LAPACKE_zlauum_work(LAPACK_COL_MAJOR, morse_lapack_const(uplo), N, A, LDA );
}
......@@ -337,7 +337,7 @@ CORE_zpamm_w(MORSE_enum side, MORSE_enum trans, MORSE_enum uplo,
/* W = A2_2 */
LAPACKE_zlacpy_work(LAPACK_COL_MAJOR,
lapack_const(MorseUpperLower),
morse_lapack_const(MorseUpperLower),
L, N,
&A2[K-L], LDA2, W, LDW);
......@@ -403,7 +403,7 @@ CORE_zpamm_w(MORSE_enum side, MORSE_enum trans, MORSE_enum uplo,
/* W = A2_2 */
LAPACKE_zlacpy_work(LAPACK_COL_MAJOR,
lapack_const(MorseUpperLower),
morse_lapack_const(MorseUpperLower),
M, L,
&A2[LDA2*(K-L)], LDA2, W, LDW);
......
......@@ -41,7 +41,7 @@ void CORE_zpotrf(MORSE_enum uplo, int N, MORSE_Complex64_t *A, int LDA, int *INF
{
*INFO = LAPACKE_zpotrf_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
N, A, LDA );
}
......
......@@ -41,7 +41,7 @@ void CORE_ztrtri(MORSE_enum uplo, MORSE_enum diag, int N, MORSE_Complex64_t *A,
{
*info = LAPACKE_ztrtri_work(
LAPACK_COL_MAJOR,
lapack_const(uplo), lapack_const(diag),
morse_lapack_const(uplo), morse_lapack_const(diag),
N, A, LDA);
}
......
......@@ -223,10 +223,10 @@ int CORE_zunmlq(MORSE_enum side, MORSE_enum trans,
* Apply H or H'
*/
LAPACKE_zlarfb_work(LAPACK_COL_MAJOR,
lapack_const(side),
lapack_const(trans),
lapack_const(MorseForward),
lapack_const(MorseRowwise),
morse_lapack_const(side),
morse_lapack_const(trans),
morse_lapack_const(MorseForward),
morse_lapack_const(MorseRowwise),
mi, ni, kb,
&A[LDA*i+i], LDA,
&T[LDT*i], LDT,
......
......@@ -216,10 +216,10 @@ int CORE_zunmqr(MORSE_enum side, MORSE_enum trans,
* Apply H or H'
*/
LAPACKE_zlarfb_work(LAPACK_COL_MAJOR,
lapack_const(side),
lapack_const(trans),
lapack_const(MorseForward),
lapack_const(MorseColumnwise),
morse_lapack_const(side),
morse_lapack_const(trans),
morse_lapack_const(MorseForward),
morse_lapack_const(MorseColumnwise),
mi, ni, kb,
&A[LDA*i+i], LDA,
&T[LDT*i], LDT,
......
......@@ -93,7 +93,7 @@ extern "C" {
* LAPACK Constants
**/
extern char *morse_lapack_constants[];
#define lapack_const(morse_const) morse_lapack_constants[morse_const][0]
#define morse_lapack_const(morse_const) morse_lapack_constants[morse_const][0]
#ifdef __cplusplus
}
......
......@@ -69,7 +69,7 @@ void CORE_zlacpy_quark(Quark *quark)
quark_unpack_args_7(quark, uplo, M, N, A, LDA, B, LDB);
LAPACKE_zlacpy_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, A, LDA, B, LDB);
}
......@@ -99,6 +99,6 @@ void CORE_zlaset_quark(Quark *quark)
quark_unpack_args_7(quark, uplo, M, N, alpha, beta, A, LDA);
LAPACKE_zlaset_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, alpha, beta, A, LDA);
}
......@@ -60,5 +60,5 @@ void CORE_zlauum_quark(Quark *quark)
int LDA;
quark_unpack_args_4(quark, uplo, N, A, LDA);
LAPACKE_zlauum_work(LAPACK_COL_MAJOR, lapack_const(uplo), N, A, LDA);
LAPACKE_zlauum_work(LAPACK_COL_MAJOR, morse_lapack_const(uplo), N, A, LDA);
}
......@@ -71,7 +71,7 @@ void CORE_zpotrf_quark(Quark *quark)
quark_unpack_args_7(quark, uplo, n, A, lda, sequence, request, iinfo);
info = LAPACKE_zpotrf_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
n, A, lda);
if (sequence->status == MORSE_SUCCESS && info != 0)
RUNTIME_sequence_flush(quark, sequence, request, iinfo+info);
......
......@@ -74,7 +74,7 @@ void CORE_ztrtri_quark(Quark *quark)
quark_unpack_args_8(quark, uplo, diag, N, A, LDA, sequence, request, iinfo);
info = LAPACKE_ztrtri_work(
LAPACK_COL_MAJOR,
lapack_const(uplo), lapack_const(diag),
morse_lapack_const(uplo), morse_lapack_const(diag),
N, A, LDA);
if ((sequence->status == MORSE_SUCCESS) && (info > 0))
RUNTIME_sequence_flush(quark, sequence, request, iinfo + info);
......
......@@ -130,7 +130,7 @@ static void cl_zgemm_cuda_func(void *descr[], void *cl_arg)
cublasSetKernelStream( stream );
cublasZgemm(
lapack_const(transA), lapack_const(transB),
morse_lapack_const(transA), morse_lapack_const(transB),
m, n, k,
alpha, A, lda,
B, ldb,
......
......@@ -126,7 +126,7 @@ static void cl_zhemm_cuda_func(void *descr[], void *cl_arg)
cublasSetKernelStream( stream );
cublasZhemm(
lapack_const(side), lapack_const(uplo),
morse_lapack_const(side), morse_lapack_const(uplo),
M, N,
alpha, A, LDA,
B, LDB,
......
......@@ -120,7 +120,7 @@ static void cl_zher2k_cuda_func(void *descr[], void *cl_arg)
CUstream stream = starpu_cuda_get_local_stream();
cublasSetKernelStream( stream );
cublasZher2k( lapack_const(uplo), lapack_const(trans),
cublasZher2k( morse_lapack_const(uplo), morse_lapack_const(trans),
n, k, alpha, A, lda, B, ldb, beta, C, ldc);
#ifndef STARPU_CUDA_ASYNC
......
......@@ -114,7 +114,7 @@ static void cl_zherk_cuda_func(void *descr[], void *cl_arg)
cublasSetKernelStream( stream );
cublasZherk(
lapack_const(uplo), lapack_const(trans),
morse_lapack_const(uplo), morse_lapack_const(trans),
n, k,
alpha, A, lda,
beta, C, ldc);
......
......@@ -81,7 +81,7 @@ static void cl_zlacpy_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args(cl_arg, &uplo, &M, &N, &LDA, &LDB);
LAPACKE_zlacpy_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, A, LDA, B, LDB);
}
......
......@@ -109,7 +109,7 @@ static void cl_zlaset_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args(cl_arg, &uplo, &M, &N, &alpha, &beta, &LDA);
LAPACKE_zlaset_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
M, N, alpha, beta, A, LDA);
}
/*
......
......@@ -70,7 +70,7 @@ static void cl_zlauum_cpu_func(void *descr[], void *cl_arg)
A = (MORSE_Complex64_t *)STARPU_MATRIX_GET_PTR(descr[0]);
starpu_codelet_unpack_args(cl_arg, &uplo, &N, &LDA);
LAPACKE_zlauum_work(LAPACK_COL_MAJOR, lapack_const(uplo), N, A, LDA);
LAPACKE_zlauum_work(LAPACK_COL_MAJOR, morse_lapack_const(uplo), N, A, LDA);
}
#if defined(CHAMELEON_USE_MAGMA)
......
......@@ -78,7 +78,7 @@ static void cl_zpotrf_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args(cl_arg, &uplo, &n, &lda, &iinfo);
info = LAPACKE_zpotrf_work(
LAPACK_COL_MAJOR,
lapack_const(uplo),
morse_lapack_const(uplo),
n, A, lda);
}
......
......@@ -126,7 +126,7 @@ static void cl_zsymm_cuda_func(void *descr[], void *cl_arg)
cublasSetKernelStream( stream );
cublasZsymm(
lapack_const(side), lapack_const(uplo),
morse_lapack_const(side), morse_lapack_const(uplo),
M, N,
alpha, A, LDA,
B, LDB,
......
......@@ -120,7 +120,7 @@ static void cl_zsyr2k_cuda_func(void *descr[], void *cl_arg)
CUstream stream = starpu_cuda_get_local_stream();
cublasSetKernelStream( stream );
cublasZsyr2k( lapack_const(uplo), lapack_const(trans),
cublasZsyr2k( morse_lapack_const(uplo), morse_lapack_const(trans),
n, k, alpha, A, lda, B, ldb, beta, C, ldc);
#ifndef STARPU_CUDA_ASYNC
......
......@@ -115,7 +115,7 @@ static void cl_zsyrk_cuda_func(void *descr[], void *cl_arg)
cublasSetKernelStream( stream );
cublasZsyrk(
lapack_const(uplo), lapack_const(trans),
morse_lapack_const(uplo), morse_lapack_const(trans),
n, k,
alpha, A, lda,
beta, C, ldc);
......
......@@ -119,8 +119,8 @@ static void cl_ztrmm_cuda_func(void *descr[], void *cl_arg)
cublasSetKernelStream( stream );
cublasZtrmm(
lapack_const(side), lapack_const(uplo),
lapack_const(transA), lapack_const(diag),
morse_lapack_const(side), morse_lapack_const(uplo),
morse_lapack_const(transA), morse_lapack_const(diag),
M, N,
alpha, A, LDA,
B, LDB);
......
......@@ -119,8 +119,8 @@ static void cl_ztrsm_cuda_func(void *descr[], void *cl_arg)
cublasSetKernelStream( stream );
cublasZtrsm(
lapack_const(side), lapack_const(uplo),
lapack_const(transA), lapack_const(diag),
morse_lapack_const(side), morse_lapack_const(uplo),
morse_lapack_const(transA), morse_lapack_const(diag),
m, n,
alpha, A, lda,
B, ldb);
......
......@@ -80,7 +80,7 @@ static void cl_ztrtri_cpu_func(void *descr[], void *cl_arg)
starpu_codelet_unpack_args(cl_arg, &uplo, &diag, &N, &LDA, &iinfo);
info = LAPACKE_ztrtri_work(
LAPACK_COL_MAJOR,
lapack_const(uplo), lapack_const(diag),
morse_lapack_const(uplo), morse_lapack_const(diag),
N, A, LDA);
}
......
......@@ -305,7 +305,7 @@ magma_zparfb_gpu(magma_side_t side, magma_trans_t trans,
transW = storev == MorseColumnwise ? MagmaConjTrans : MagmaNoTrans;
transA2 = storev == MorseColumnwise ? MagmaNoTrans : MagmaConjTrans;
cublasZgemm(lapack_const(transW), lapack_const(MagmaNoTrans),
cublasZgemm(morse_lapack_const(transW), morse_lapack_const(MagmaNoTrans),
K, N1, M2,
zone,
(cuDoubleComplex*)V /* K*M2 */, LDV,
......@@ -316,8 +316,8 @@ magma_zparfb_gpu(magma_side_t side, magma_trans_t trans,
WORKC = NULL;
if (WORKC == NULL) {
/* W = op(T) * W */
cublasZtrmm( lapack_const(MagmaLeft), lapack_const(MagmaUpper),
lapack_const(trans), lapack_const(MagmaNonUnit),
cublasZtrmm( morse_lapack_const(MagmaLeft), morse_lapack_const(MagmaUpper),
morse_lapack_const(trans), morse_lapack_const(MagmaNonUnit),
K, N2,
zone,
(cuDoubleComplex*)T, LDT,
......@@ -332,7 +332,7 @@ magma_zparfb_gpu(magma_side_t side, magma_trans_t trans,
}
/* A2 = A2 - op(V) * W */
cublasZgemm(lapack_const(transA2), lapack_const(MagmaNoTrans),
cublasZgemm(morse_lapack_const(transA2), morse_lapack_const(MagmaNoTrans),
M2, N2, K,
mzone,
(cuDoubleComplex*)V /* M2*K */, LDV,
......@@ -342,21 +342,21 @@ magma_zparfb_gpu(magma_side_t side, magma_trans_t trans,
} else {
/* Wc = V * op(T) */
cublasZgemm( lapack_const(transA2), lapack_const(trans),
cublasZgemm( morse_lapack_const(transA2), morse_lapack_const(trans),
M2, K, K,
zone, V, LDV,
T, LDT,
zzero, WORKC, LDWORKC );
/* A1 = A1 - opt(T) * W */
cublasZgemm( lapack_const(trans), lapack_const(MagmaNoTrans),
cublasZgemm( morse_lapack_const(trans), morse_lapack_const(MagmaNoTrans),
K, N1, K,
mzone, T, LDT,
WORK, LDWORK,
zone, A1, LDA1 );
/* A2 = A2 - Wc * W */
cublasZgemm( lapack_const(MagmaNoTrans), lapack_const(MagmaNoTrans),
cublasZgemm( morse_lapack_const(MagmaNoTrans), morse_lapack_const(MagmaNoTrans),
M2, N2, K,
mzone, WORKC, LDWORKC,
WORK, LDWORK,
......@@ -386,7 +386,7 @@ magma_zparfb_gpu(magma_side_t side, magma_trans_t trans,
transW = storev == MorseColumnwise ? MagmaNoTrans : MagmaConjTrans;
transA2 = storev == MorseColumnwise ? MagmaConjTrans : MagmaNoTrans;
cublasZgemm(lapack_const(MagmaNoTrans), lapack_const(transW),
cublasZgemm(morse_lapack_const(MagmaNoTrans), morse_lapack_const(transW),
M1, K, N2,
zone,
(cuDoubleComplex*)A2 /* M1*N2 */, LDA2,
......@@ -397,8 +397,8 @@ magma_zparfb_gpu(magma_side_t side, magma_trans_t trans,
WORKC = NULL;
if (WORKC == NULL) {
/* W = W * op(T) */
cublasZtrmm( lapack_const(MagmaRight), lapack_const(MagmaUpper),
lapack_const(trans), lapack_const(MagmaNonUnit),
cublasZtrmm( morse_lapack_const(MagmaRight), morse_lapack_const(MagmaUpper),
morse_lapack_const(trans), morse_lapack_const(MagmaNonUnit),
M2, K,
zone,
(cuDoubleComplex*)T, LDT,
......@@ -413,7 +413,7 @@ magma_zparfb_gpu(magma_side_t side, magma_trans_t trans,
}
/* A2 = A2 - W * op(V) */
cublasZgemm(lapack_const(MagmaNoTrans), lapack_const(transA2),
cublasZgemm(morse_lapack_const(MagmaNoTrans), morse_lapack_const(transA2),
M2, N2, K,
mzone,
(cuDoubleComplex*)WORK /* M2*K */, LDWORK,
......@@ -423,21 +423,21 @@ magma_zparfb_gpu(magma_side_t side, magma_trans_t trans,
} else {
/* A1 = A1 - W * opt(T) */
cublasZgemm( lapack_const(MagmaNoTrans), lapack_const(trans),
cublasZgemm( morse_lapack_const(MagmaNoTrans), morse_lapack_const(trans),
M1, K, K,
mzone, WORK, LDWORK,
T, LDT,
zone, A1, LDA1 );
/* Wc = op(T) * V */
cublasZgemm( lapack_const(trans), lapack_const(transA2),
cublasZgemm( morse_lapack_const(trans), morse_lapack_const(transA2),
K, N2, K,
zone, T, LDT,
V, LDV,
zzero, WORKC, LDWORKC );
/* A2 = A2 - W * Wc */
cublasZgemm( lapack_const(MagmaNoTrans), lapack_const(MagmaNoTrans),
cublasZgemm( morse_lapack_const(MagmaNoTrans), morse_lapack_const(MagmaNoTrans),
M2, N2, K,
mzone, WORK, LDWORK,
WORKC, LDWORKC,
......
......@@ -188,19 +188,19 @@ static int check_solution(MORSE_enum transA, MORSE_enum transB, int M, int N, in
Bm = N; Bn = K;
}
Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), Am, An, A, LDA, work);
Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), Bm, Bn, B, LDB, work);
Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, Cmorse, LDC, work);
Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), Am, An, A, LDA, work);
Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), Bm, Bn, B, LDB, work);
Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, Cmorse, LDC, work);
cblas_zgemm(CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB, M, N, K,
CBLAS_SADDR(alpha), A, LDA, B, LDB, CBLAS_SADDR(beta), Cref, LDC);
Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
cblas_zaxpy(LDC * N, CBLAS_SADDR(beta_const), Cmorse, 1, Cref, 1);
Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
eps = LAPACKE_dlamch_work('e');
if (MORSE_My_Mpi_Rank() == 0)
......
......@@ -165,18 +165,18 @@ static int check_solution(MORSE_enum side, MORSE_enum uplo, int M, int N,
beta_const = (MORSE_Complex64_t)-1.0;
NrowA = (side == MorseLeft) ? M : N;
Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), NrowA, NrowA, A, LDA, work);
Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, B, LDB, work);
Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, Cmorse, LDC, work);
Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), NrowA, NrowA, A, LDA, work);
Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, B, LDB, work);
Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, Cmorse, LDC, work);
cblas_zhemm(CblasColMajor, (CBLAS_SIDE)side, (CBLAS_UPLO)uplo, M, N, CBLAS_SADDR(alpha), A, LDA, B, LDB, CBLAS_SADDR(beta), Cref, LDC);
Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
cblas_zaxpy(LDC * N, CBLAS_SADDR(beta_const), Cmorse, 1, Cref, 1);
Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), M, N, Cref, LDC, work);
eps = LAPACKE_dlamch_work('e');
......
......@@ -159,23 +159,23 @@ 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, lapack_const(MorseInfNorm),
Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm),
(trans == MorseNoTrans) ? N : K,
(trans == MorseNoTrans) ? K : N, A, LDA, work);
Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm),
Bnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm),
(trans == MorseNoTrans) ? N : K,
(trans == MorseNoTrans) ? K : N, B, LDB, work);
Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), N, N, Cmorse, LDC, work);
Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), N, N, Cmorse, LDC, work);
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, lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
cblas_zaxpy(LDC*N, CBLAS_SADDR(beta_const), Cmorse, 1, Cref, 1);
Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
eps = LAPACKE_dlamch_work('e');
......
......@@ -152,20 +152,20 @@ 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, lapack_const(MorseInfNorm),
Anorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm),
(trans == MorseNoTrans) ? N : K,
(trans == MorseNoTrans) ? K : N, A, LDA, work);
Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), N, N, Cmorse, LDC, work);
Cinitnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
Cmorsenorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), N, N, Cmorse, LDC, work);
cblas_zherk(CblasColMajor, (CBLAS_UPLO)uplo, (CBLAS_TRANSPOSE)trans,
N, K, (alpha), A, LDA, (beta), Cref, LDC);
Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
Clapacknorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
cblas_zaxpy(LDC*N, CBLAS_SADDR(beta_const), Cmorse, 1, Cref, 1);
Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
Rnorm = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(MorseInfNorm), N, N, Cref, LDC, work);
eps = LAPACKE_dlamch_work('e');
......
......@@ -83,7 +83,7 @@ int testing_zlange(int argc, char **argv)
/* MORSE ZLANGE */
for(n=0; n<4; n++) {
normmorse = MORSE_zlange(norm[n], M, N, A, LDA);
normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, lapack_const(norm[n]), M, N, A, LDA, work);
normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(norm[n]), M, N, A, LDA, work);
printf("LAPACK %e, CHAMELEON %e\n", normlapack, normmorse);
result = fabs(normmorse - normlapack) / (normlapack * eps);
......@@ -123,8 +123,8 @@ int testing_zlange(int argc, char **argv)
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, lapack_const(norm[n]), lapack_const(uplo[u]),
lapack_const(diag[d]), M, N, A, LDA, work);