Commit 4b52f1eb authored by Mathieu Faverge's avatar Mathieu Faverge

Apply the max/min change to other runtimes and timings

parent 6a7a74cc
...@@ -143,7 +143,7 @@ int morse_alloc_ipiv(int M, int N, MORSE_enum func, int type, MORSE_desc_t **des ...@@ -143,7 +143,7 @@ int morse_alloc_ipiv(int M, int N, MORSE_enum func, int type, MORSE_desc_t **des
lm = IB * MT; lm = IB * MT;
ln = NB * NT; ln = NB * NT;
size = (size_t)(min(MT, NT) * NB * NT * sizeof(int)); size = (size_t)(chameleon_min(MT, NT) * NB * NT * sizeof(int));
if (size <= 0) { if (size <= 0) {
*IPIV = NULL; *IPIV = NULL;
return MORSE_SUCCESS; return MORSE_SUCCESS;
......
...@@ -55,7 +55,7 @@ void MORSE_TASK_zlange(const MORSE_option_t *options, ...@@ -55,7 +55,7 @@ void MORSE_TASK_zlange(const MORSE_option_t *options,
{ {
dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt); dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);
int szeW = max( M, N ); int szeW = chameleon_max( M, N );
dague_insert_task( dague_insert_task(
DAGUE_dtd_handle, CORE_zlange_parsec, "lange", DAGUE_dtd_handle, CORE_zlange_parsec, "lange",
......
...@@ -55,7 +55,7 @@ void MORSE_TASK_zlanhe(const MORSE_option_t *options, ...@@ -55,7 +55,7 @@ void MORSE_TASK_zlanhe(const MORSE_option_t *options,
{ {
dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt); dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);
int szeW = max( 1, N ); int szeW = chameleon_max( 1, N );
dague_insert_task( dague_insert_task(
DAGUE_dtd_handle, CORE_zlanhe_parsec, "LANHE", DAGUE_dtd_handle, CORE_zlanhe_parsec, "LANHE",
......
...@@ -55,7 +55,7 @@ void MORSE_TASK_zlansy(const MORSE_option_t *options, ...@@ -55,7 +55,7 @@ void MORSE_TASK_zlansy(const MORSE_option_t *options,
{ {
dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt); dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);
int szeW = max( 1, N ); int szeW = chameleon_max( 1, N );
dague_insert_task( dague_insert_task(
DAGUE_dtd_handle, CORE_zlansy_parsec, "lansy", DAGUE_dtd_handle, CORE_zlansy_parsec, "lansy",
......
...@@ -58,7 +58,7 @@ void MORSE_TASK_zlantr(const MORSE_option_t *options, ...@@ -58,7 +58,7 @@ void MORSE_TASK_zlantr(const MORSE_option_t *options,
{ {
dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt); dague_dtd_handle_t* DAGUE_dtd_handle = (dague_dtd_handle_t *)(options->sequence->schedopt);
int szeW = max( 1, N ); int szeW = chameleon_max( 1, N );
dague_insert_task( dague_insert_task(
DAGUE_dtd_handle, CORE_zlantr_parsec, "lantr", DAGUE_dtd_handle, CORE_zlantr_parsec, "lantr",
......
...@@ -36,16 +36,17 @@ void MORSE_TASK_zlange(const MORSE_option_t *options, ...@@ -36,16 +36,17 @@ void MORSE_TASK_zlange(const MORSE_option_t *options,
{ {
quark_option_t *opt = (quark_option_t*)(options->schedopt); quark_option_t *opt = (quark_option_t*)(options->schedopt);
DAG_CORE_LANGE; DAG_CORE_LANGE;
int szeW = max( M, N ); int szeW = chameleon_max( M, N );
QUARK_Insert_Task(opt->quark, CORE_zlange_quark, (Quark_Task_Flags*)opt, QUARK_Insert_Task(
sizeof(MORSE_enum), &norm, VALUE, opt->quark, CORE_zlange_quark, (Quark_Task_Flags*)opt,
sizeof(int), &M, VALUE, sizeof(MORSE_enum), &norm, VALUE,
sizeof(int), &N, VALUE, sizeof(int), &M, VALUE,
sizeof(MORSE_Complex64_t)*NB*NB, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT, sizeof(int), &N, VALUE,
sizeof(int), &LDA, VALUE, sizeof(MORSE_Complex64_t)*NB*NB, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT,
sizeof(double)*szeW, NULL, SCRATCH, sizeof(int), &LDA, VALUE,
sizeof(double), RTBLKADDR(B, double, Bm, Bn), OUTPUT, sizeof(double)*szeW, NULL, SCRATCH,
0); sizeof(double), RTBLKADDR(B, double, Bm, Bn), OUTPUT,
0);
} }
void CORE_zlange_quark(Quark *quark) void CORE_zlange_quark(Quark *quark)
...@@ -69,10 +70,11 @@ void MORSE_TASK_zlange_max(const MORSE_option_t *options, ...@@ -69,10 +70,11 @@ void MORSE_TASK_zlange_max(const MORSE_option_t *options,
{ {
quark_option_t *opt = (quark_option_t*)(options->schedopt); quark_option_t *opt = (quark_option_t*)(options->schedopt);
DAG_CORE_LANGE_MAX; DAG_CORE_LANGE_MAX;
QUARK_Insert_Task(opt->quark, CORE_zlange_max_quark, (Quark_Task_Flags*)opt, QUARK_Insert_Task(
sizeof(double), RTBLKADDR(A, double, Am, An), INPUT, opt->quark, CORE_zlange_max_quark, (Quark_Task_Flags*)opt,
sizeof(double), RTBLKADDR(B, double, Bm, Bn), OUTPUT, sizeof(double), RTBLKADDR(A, double, Am, An), INPUT,
0); sizeof(double), RTBLKADDR(B, double, Bm, Bn), OUTPUT,
0);
} }
...@@ -82,7 +84,7 @@ void CORE_zlange_max_quark(Quark *quark) ...@@ -82,7 +84,7 @@ void CORE_zlange_max_quark(Quark *quark)
double *normA; double *normA;
quark_unpack_args_2(quark, A, normA); quark_unpack_args_2(quark, A, normA);
if ( A[0] > *normA ) if ( A[0] > *normA )
*normA = A[0]; *normA = A[0];
} }
...@@ -36,16 +36,17 @@ void MORSE_TASK_zlanhe(const MORSE_option_t *options, ...@@ -36,16 +36,17 @@ void MORSE_TASK_zlanhe(const MORSE_option_t *options,
{ {
quark_option_t *opt = (quark_option_t*)(options->schedopt); quark_option_t *opt = (quark_option_t*)(options->schedopt);
DAG_CORE_LANHE; DAG_CORE_LANHE;
int szeW = max( 1, N ); int szeW = chameleon_max( 1, N );
QUARK_Insert_Task(opt->quark, CORE_zlanhe_quark, (Quark_Task_Flags*)opt, QUARK_Insert_Task(
sizeof(MORSE_enum), &norm, VALUE, opt->quark, CORE_zlanhe_quark, (Quark_Task_Flags*)opt,
sizeof(MORSE_enum), &uplo, VALUE, sizeof(MORSE_enum), &norm, VALUE,
sizeof(int), &N, VALUE, sizeof(MORSE_enum), &uplo, VALUE,
sizeof(MORSE_Complex64_t)*NB*NB, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT, sizeof(int), &N, VALUE,
sizeof(int), &LDA, VALUE, sizeof(MORSE_Complex64_t)*NB*NB, RTBLKADDR(A, MORSE_Complex64_t, Am, An), INPUT,
sizeof(double)*szeW, NULL, SCRATCH, sizeof(int), &LDA, VALUE,
sizeof(double), RTBLKADDR(B, double, Bm, Bn), OUTPUT, sizeof(double)*szeW, NULL, SCRATCH,
0); sizeof(double), RTBLKADDR(B, double, Bm, Bn), OUTPUT,
0);
} }
void CORE_zlanhe_quark(Quark *quark) void CORE_zlanhe_quark(Quark *quark)
......
...@@ -36,8 +36,9 @@ void MORSE_TASK_zlansy(const MORSE_option_t *options, ...@@ -36,8 +36,9 @@ void MORSE_TASK_zlansy(const MORSE_option_t *options,
{ {
quark_option_t *opt = (quark_option_t*)(options->schedopt); quark_option_t *opt = (quark_option_t*)(options->schedopt);
DAG_CORE_LANSY; DAG_CORE_LANSY;
int szeW = max( 1, N ); int szeW = chameleon_max( 1, N );
QUARK_Insert_Task(opt->quark, CORE_zlansy_quark, (Quark_Task_Flags*)opt, QUARK_Insert_Task(
opt->quark, CORE_zlansy_quark, (Quark_Task_Flags*)opt,
sizeof(MORSE_enum), &norm, VALUE, sizeof(MORSE_enum), &norm, VALUE,
sizeof(MORSE_enum), &uplo, VALUE, sizeof(MORSE_enum), &uplo, VALUE,
sizeof(int), &N, VALUE, sizeof(int), &N, VALUE,
......
...@@ -34,8 +34,9 @@ void MORSE_TASK_zlantr(const MORSE_option_t *options, ...@@ -34,8 +34,9 @@ void MORSE_TASK_zlantr(const MORSE_option_t *options,
{ {
quark_option_t *opt = (quark_option_t*)(options->schedopt); quark_option_t *opt = (quark_option_t*)(options->schedopt);
DAG_CORE_LANTR; DAG_CORE_LANTR;
int szeW = max( 1, N ); int szeW = chameleon_max( 1, N );
QUARK_Insert_Task(opt->quark, CORE_zlantr_quark, (Quark_Task_Flags*)opt, QUARK_Insert_Task(
opt->quark, CORE_zlantr_quark, (Quark_Task_Flags*)opt,
sizeof(MORSE_enum), &norm, VALUE, sizeof(MORSE_enum), &norm, VALUE,
sizeof(MORSE_enum), &uplo, VALUE, sizeof(MORSE_enum), &uplo, VALUE,
sizeof(MORSE_enum), &diag, VALUE, sizeof(MORSE_enum), &diag, VALUE,
......
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
#include "timing_zauxiliary.h" #include "timing_zauxiliary.h"
static int static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
MORSE_Complex64_t alpha, beta; MORSE_Complex64_t alpha, beta;
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
LDB = max(K, iparam[IPARAM_LDB]); LDB = chameleon_max(K, iparam[IPARAM_LDB]);
LDC = max(M, iparam[IPARAM_LDC]); LDC = chameleon_max(M, iparam[IPARAM_LDC]);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, K ); PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, K );
......
...@@ -26,14 +26,14 @@ ...@@ -26,14 +26,14 @@
#include "timing_zauxiliary.h" #include "timing_zauxiliary.h"
static int static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
MORSE_Complex64_t alpha, beta; MORSE_Complex64_t alpha, beta;
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
LDB = max(K, iparam[IPARAM_LDB]); LDB = chameleon_max(K, iparam[IPARAM_LDB]);
LDC = max(M, iparam[IPARAM_LDC]); LDC = chameleon_max(M, iparam[IPARAM_LDC]);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, M, K ); PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, M, K );
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "timing_zauxiliary.h" #include "timing_zauxiliary.h"
static int static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
MORSE_desc_t *L; MORSE_desc_t *L;
int *piv; int *piv;
...@@ -44,7 +44,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -44,7 +44,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
MORSE_zplrnt(M, N, A, LDA, 3456); MORSE_zplrnt(M, N, A, LDA, 3456);
/* Allocate Workspace */ /* Allocate Workspace */
MORSE_Alloc_Workspace_zgesv_incpiv( min(M,N), &L, &piv, P, Q); MORSE_Alloc_Workspace_zgesv_incpiv( chameleon_min(M,N), &L, &piv, P, Q);
/* Save AT in lapack layout for check */ /* Save AT in lapack layout for check */
PASTE_CODE_ALLOCATE_COPY( Acpy, check, MORSE_Complex64_t, A, LDA, N ); PASTE_CODE_ALLOCATE_COPY( Acpy, check, MORSE_Complex64_t, A, LDA, N );
...@@ -63,8 +63,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -63,8 +63,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
MORSE_zgetrs_incpiv( MorseNoTrans, N, NRHS, A, LDA, L, piv, X, LDB ); MORSE_zgetrs_incpiv( MorseNoTrans, N, NRHS, A, LDA, L, piv, X, LDB );
dparam[IPARAM_RES] = z_check_solution(M, N, NRHS, Acpy, LDA, B, X, LDB, dparam[IPARAM_RES] = z_check_solution(M, N, NRHS, Acpy, LDA, B, X, LDB,
&(dparam[IPARAM_ANORM]), &(dparam[IPARAM_ANORM]),
&(dparam[IPARAM_BNORM]), &(dparam[IPARAM_BNORM]),
&(dparam[IPARAM_XNORM])); &(dparam[IPARAM_XNORM]));
free( Acpy ); free( B ); free( X ); free( Acpy ); free( B ); free( X );
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "./timing.c" #include "./timing.c"
static int static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
MORSE_desc_t *descL; MORSE_desc_t *descL;
int *piv; int *piv;
...@@ -52,7 +52,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -52,7 +52,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
MORSE_zplrnt_Tile(descA, 3456); MORSE_zplrnt_Tile(descA, 3456);
/* Allocate Workspace */ /* Allocate Workspace */
MORSE_Alloc_Workspace_zgesv_incpiv_Tile(min(M,N), &descL, &piv, P, Q); MORSE_Alloc_Workspace_zgesv_incpiv_Tile(chameleon_min(M,N), &descL, &piv, P, Q);
/* Save A for check */ /* Save A for check */
if (check == 1){ if (check == 1){
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "./timing.c" #include "./timing.c"
static int static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
MORSE_desc_t *descL; MORSE_desc_t *descL;
int *piv; int *piv;
...@@ -53,7 +53,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -53,7 +53,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
MORSE_zplrnt_Tile(descA, 3456); MORSE_zplrnt_Tile(descA, 3456);
/* Allocate Workspace */ /* Allocate Workspace */
MORSE_Alloc_Workspace_zgesv_incpiv_Tile(min(M,N), &descL, &piv, P, Q); MORSE_Alloc_Workspace_zgesv_incpiv_Tile(chameleon_min(M,N), &descL, &piv, P, Q);
/* Save A for check */ /* Save A for check */
if (check == 1){ if (check == 1){
......
...@@ -34,7 +34,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -34,7 +34,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
int vec = MorseVec; int vec = MorseVec;
int INFO; int INFO;
LDA = max(LDA, N); LDA = chameleon_max(LDA, N);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N); PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N);
......
...@@ -45,7 +45,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -45,7 +45,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
/* Check the solution */ /* Check the solution */
if ( check ) if ( check )
{ {
double *work = (double*) malloc(max(M,N)*sizeof(double)); double *work = (double*) malloc(chameleon_max(M,N)*sizeof(double));
normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(norm), M, N, A, LDA, work); normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(norm), M, N, A, LDA, work);
result = fabs(normmorse - normlapack); result = fabs(normmorse - normlapack);
switch(norm) { switch(norm) {
......
...@@ -47,7 +47,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -47,7 +47,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
/* Allocate Data */ /* Allocate Data */
PASTE_TILE_TO_LAPACK( descA, A, check, MORSE_Complex64_t, M, N ); PASTE_TILE_TO_LAPACK( descA, A, check, MORSE_Complex64_t, M, N );
double *work = (double*) malloc(max(M,N)*sizeof(double)); double *work = (double*) malloc(chameleon_max(M,N)*sizeof(double));
normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(norm), M, N, A, LDA, work); normlapack = LAPACKE_zlange_work(LAPACK_COL_MAJOR, morse_lapack_const(norm), M, N, A, LDA, work);
result = fabs(normmorse - normlapack); result = fabs(normmorse - normlapack);
switch(norm) { switch(norm) {
......
...@@ -26,17 +26,17 @@ ...@@ -26,17 +26,17 @@
#include "timing_zauxiliary.h" #include "timing_zauxiliary.h"
static int static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
MORSE_enum uplo = MorseUpper; MORSE_enum uplo = MorseUpper;
LDA = max(LDA, N); LDA = chameleon_max(LDA, N);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N ); PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N );
PASTE_CODE_ALLOCATE_MATRIX( X, 1, MORSE_Complex64_t, LDB, NRHS ); PASTE_CODE_ALLOCATE_MATRIX( X, 1, MORSE_Complex64_t, LDB, NRHS );
/* Initialiaze Data */ /* Initialiaze Data */
MORSE_zplghe((double)N, MorseUpperLower, N, A, LDA, 51 ); MORSE_zplghe((double)N, MorseUpperLower, N, A, LDA, 51 );
MORSE_zplrnt( N, NRHS, X, LDB, 5673 ); MORSE_zplrnt( N, NRHS, X, LDB, 5673 );
...@@ -54,13 +54,13 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -54,13 +54,13 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
if (check) if (check)
{ {
dparam[IPARAM_RES] = z_check_solution(N, N, NRHS, Acpy, LDA, B, X, LDB, dparam[IPARAM_RES] = z_check_solution(N, N, NRHS, Acpy, LDA, B, X, LDB,
&(dparam[IPARAM_ANORM]), &(dparam[IPARAM_ANORM]),
&(dparam[IPARAM_BNORM]), &(dparam[IPARAM_BNORM]),
&(dparam[IPARAM_XNORM])); &(dparam[IPARAM_XNORM]));
free(Acpy); free(B); free(Acpy); free(B);
} }
free(A); free(X); free(A); free(X);
return 0; return 0;
} }
...@@ -30,7 +30,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -30,7 +30,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
MORSE_enum uplo = MorseUpper; MORSE_enum uplo = MorseUpper;
LDA = max(LDA, N); LDA = chameleon_max(LDA, N);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, N, N ); PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, N, N );
......
...@@ -31,7 +31,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -31,7 +31,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
int uplo = MorseLower; int uplo = MorseLower;
LDA = max(LDA, N); LDA = chameleon_max(LDA, N);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N ); PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N );
......
...@@ -30,7 +30,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -30,7 +30,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
int uplo = MorseUpper; int uplo = MorseUpper;
LDA = max(LDA, N); LDA = chameleon_max(LDA, N);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, N, N ); PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, N, N );
......
...@@ -27,19 +27,19 @@ ...@@ -27,19 +27,19 @@
#include "./timing.c" #include "./timing.c"
static int static int
RunTest(int *iparam, double *dparam, morse_time_t *t_) RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
MORSE_enum uplo = MorseLower; MORSE_enum uplo = MorseLower;
LDA = max(LDA, N); LDA = chameleon_max(LDA, N);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, N, N ); PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, N, N );
/* /*
* Initialize Data * Initialize Data
* It's done in static to avoid having the same sequence than one * It's done in static to avoid having the same sequence than one
* the function we want to trace * the function we want to trace
*/ */
MORSE_zplghe_Tile( (double)N, MorseUpperLower, descA, 51 ); MORSE_zplghe_Tile( (double)N, MorseUpperLower, descA, 51 );
......
...@@ -30,7 +30,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -30,7 +30,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
int uplo = MorseUpper; int uplo = MorseUpper;
LDA = max(LDA, N); LDA = chameleon_max(LDA, N);
check = 1; check = 1;
/* Allocate Data */ /* Allocate Data */
......
...@@ -30,7 +30,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -30,7 +30,7 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
int uplo = MorseUpper; int uplo = MorseUpper;
LDA = max(LDA, N); LDA = chameleon_max(LDA, N);
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, N, N ); PASTE_CODE_ALLOCATE_MATRIX_TILE( descA, 1, MORSE_Complex64_t, MorseComplexDouble, LDA, N, N );
......
...@@ -30,8 +30,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -30,8 +30,8 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
{ {
MORSE_Complex64_t alpha; MORSE_Complex64_t alpha;
PASTE_CODE_IPARAM_LOCALS( iparam ); PASTE_CODE_IPARAM_LOCALS( iparam );
LDA = max( LDA, N ); LDA = chameleon_max( LDA, N );
/* Allocate Data */ /* Allocate Data */
PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N ); PASTE_CODE_ALLOCATE_MATRIX( A, 1, MORSE_Complex64_t, LDA, N );
...@@ -57,10 +57,10 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_) ...@@ -57,10 +57,10 @@ RunTest(int *iparam, double *dparam, morse_time_t *t_)
/* Check the solution */ /* Check the solution */
if (check) if (check)
{ {
dparam[IPARAM_RES] = z_check_trsm( MorseLeft, MorseUpper, MorseNoTrans, MorseUnit, dparam[IPARAM_RES] = z_check_trsm( MorseLeft, MorseUpper, MorseNoTrans, MorseUnit,
N, NRHS, N, NRHS,
alpha, A, LDA, B, B2, LDB, alpha, A, LDA, B, B2, LDB,
&(dparam[IPARAM_ANORM]), &(dparam[IPARAM_ANORM]),
&(dparam[IPARAM_BNORM]), &(dparam[IPARAM_BNORM]),
&(dparam[IPARAM_XNORM])); &(dparam[IPARAM_XNORM]));
free(B2); free(B2);
......
...@@ -700,9 +700,9 @@ main(int argc, char *argv[]) { ...@@ -700,9 +700,9 @@ main(int argc, char *argv[]) {
{ {
if ( nx > 0 ) { if ( nx > 0 ) {
iparam[IPARAM_M] = i; iparam[IPARAM_M] = i;
iparam[IPARAM_N] = max(1, i/nx); iparam[IPARAM_N] = chameleon_max(1, i/nx);
} else if ( mx > 0 ) { } else if ( mx > 0 ) {
iparam[IPARAM_M] = max(1, i/mx); iparam[IPARAM_M] = chameleon_max(1, i/mx);
iparam[IPARAM_N] = i; iparam[IPARAM_N] = i;
} else { } else {
if ( m == -1 ) if ( m == -1 )
......
...@@ -86,9 +86,9 @@ enum dparam_timing { ...@@ -86,9 +86,9 @@ enum dparam_timing {
int64_t N = iparam[IPARAM_N]; \ int64_t N = iparam[IPARAM_N]; \
int64_t K = iparam[IPARAM_K]; \ int64_t K = iparam[IPARAM_K]; \