diff --git a/testing/testing_zcesca.c b/testing/testing_zcesca.c index 0e8df8ad53c77b3d89e9b3373a9ae095ae0b70ef..b1ee5813a86fdb99d9968b2fdd77d928daa87eb3 100644 --- a/testing/testing_zcesca.c +++ b/testing/testing_zcesca.c @@ -22,9 +22,12 @@ #include <chameleon/flops.h> static cham_fixdbl_t -flops_zcesca( int M, int N ) +flops_zcesca( int _M, int _N ) { cham_fixdbl_t flops = 0.; + cham_fixdbl_t M = _M; + cham_fixdbl_t N = _N; + #if defined(PRECISION_z) || defined(PRECISION_c) /* 2 multiplications and 5 addition per element */ flops = ( 2. * 6. + 10. ) * M * N; diff --git a/testing/testing_zgeadd.c b/testing/testing_zgeadd.c index ab0b79b4c1e372ed7346a0f3f82214c05f035ab9..98d475f53a18f370045fb3a61f94c7d994b88d36 100644 --- a/testing/testing_zgeadd.c +++ b/testing/testing_zgeadd.c @@ -23,9 +23,12 @@ #include <chameleon/flops.h> static cham_fixdbl_t -flops_zgeadd( int M, int N ) +flops_zgeadd( int _M, int _N ) { cham_fixdbl_t flops = 0.; + cham_fixdbl_t M = _M; + cham_fixdbl_t N = _N; + #if defined(PRECISION_z) || defined(PRECISION_c) /* 2 multiplications and 1 addition per element */ flops = ( 2. * 6. + 2. ) * M * N; diff --git a/testing/testing_zgenm2.c b/testing/testing_zgenm2.c index 46ca16531284ec7c0e0f790c22ec6221e26b2c46..d9f17be665961a7374fc5f1f98a0a0e1a69d8dd5 100644 --- a/testing/testing_zgenm2.c +++ b/testing/testing_zgenm2.c @@ -35,7 +35,7 @@ flops_zgenm2( int M, int N ) coefabs = 3.; #endif - return coefabs * M * N; + return coefabs * (cham_fixdbl_t)(M) * (cham_fixdbl_t)(N); } int diff --git a/testing/testing_zgram.c b/testing/testing_zgram.c index bd351ed3689afa7e2fcc34b647a1c48b798c7b2a..67371026145a6f7c81a99aca076b2b876bd67352 100644 --- a/testing/testing_zgram.c +++ b/testing/testing_zgram.c @@ -22,9 +22,11 @@ #include <chameleon/flops.h> static cham_fixdbl_t -flops_zgram( int N ) +flops_zgram( int _N ) { cham_fixdbl_t flops = 0.; + cham_fixdbl_t N = _N; + #if defined(PRECISION_z) || defined(PRECISION_c) /* 5 multiplications and 3 addition per element */ flops = ( 5. * 6. + 6. ) * N * N; diff --git a/testing/testing_zlacpy.c b/testing/testing_zlacpy.c index 52174f9f3e4e1e3761363db00ab2e61687137f8e..b34136edbe7b4851af9089345038d9281c35889e 100644 --- a/testing/testing_zlacpy.c +++ b/testing/testing_zlacpy.c @@ -26,9 +26,11 @@ #endif static cham_fixdbl_t -flops_zlacpy( cham_uplo_t uplo, int M, int N ) +flops_zlacpy( cham_uplo_t uplo, int _M, int _N ) { cham_fixdbl_t flops; + cham_fixdbl_t M = _M; + cham_fixdbl_t N = _N; switch ( uplo ) { case ChamUpper: diff --git a/testing/testing_zlange.c b/testing/testing_zlange.c index 8b2416bed76108841e4cdd5e5982f9b258e14afa..e9a2e3f701ceb3ac572439dfcb405d9071afdc19 100644 --- a/testing/testing_zlange.c +++ b/testing/testing_zlange.c @@ -28,16 +28,18 @@ #endif static cham_fixdbl_t -flops_zlange( cham_normtype_t ntype, int M, int N ) +flops_zlange( cham_normtype_t ntype, int _M, int _N ) { cham_fixdbl_t flops = 0.; cham_fixdbl_t coefabs = 1.; - cham_fixdbl_t size; + cham_fixdbl_t M = _M; + cham_fixdbl_t N = _N; + cham_fixdbl_t size = M * N; + #if defined(PRECISION_z) || defined(PRECISION_c) coefabs = 3.; #endif - size = (cham_fixdbl_t)M * (cham_fixdbl_t)N; switch ( ntype ) { case ChamMaxNorm: flops = coefabs * size; diff --git a/testing/testing_zlanhe.c b/testing/testing_zlanhe.c index 225f3065640ca5fa6e3f20e31af3917a87b2653c..1dbfb3162586f4d83275aa2559032e58ba40a132 100644 --- a/testing/testing_zlanhe.c +++ b/testing/testing_zlanhe.c @@ -27,16 +27,16 @@ #endif static cham_fixdbl_t -flops_zlanhe( cham_normtype_t ntype, int N ) +flops_zlanhe( cham_normtype_t ntype, int _N ) { cham_fixdbl_t flops = 0.; cham_fixdbl_t coefabs = 1.; - cham_fixdbl_t size; + cham_fixdbl_t N = _N; + cham_fixdbl_t size = ( N * ( N + 1 ) ) / 2.; #if defined(PRECISION_z) || defined(PRECISION_c) coefabs = 3.; #endif - size = ( (cham_fixdbl_t)N * ( (cham_fixdbl_t)N + 1. ) ) / 2.; switch ( ntype ) { case ChamMaxNorm: flops = coefabs * size; diff --git a/testing/testing_zlansy.c b/testing/testing_zlansy.c index 8f3e10915940aa091dc97010feae9fcd5e11bf73..3cb28668988337ee5a13cb5d8e0d4aa5fd4f5abc 100644 --- a/testing/testing_zlansy.c +++ b/testing/testing_zlansy.c @@ -27,16 +27,16 @@ #endif static cham_fixdbl_t -flops_zlansy( cham_normtype_t ntype, int N ) +flops_zlansy( cham_normtype_t ntype, int _N ) { cham_fixdbl_t flops = 0.; cham_fixdbl_t coefabs = 1.; - cham_fixdbl_t size; + cham_fixdbl_t N = _N; + cham_fixdbl_t size = ( N * ( N + 1 ) ) / 2.; #if defined(PRECISION_z) || defined(PRECISION_c) coefabs = 3.; #endif - size = ( (cham_fixdbl_t)N * ( (cham_fixdbl_t)N + 1. ) ) / 2.; switch ( ntype ) { case ChamMaxNorm: flops = coefabs * size; diff --git a/testing/testing_zlantr.c b/testing/testing_zlantr.c index 78057457e3cf9f9efe9b377a948e379c03fd9d64..59332b2d7758e72d94699073566fcdeb3b4ef5e0 100644 --- a/testing/testing_zlantr.c +++ b/testing/testing_zlantr.c @@ -27,10 +27,12 @@ #endif static cham_fixdbl_t -flops_zlantr( cham_normtype_t ntype, cham_uplo_t uplo, int M, int N ) +flops_zlantr( cham_normtype_t ntype, cham_uplo_t uplo, int _M, int _N ) { cham_fixdbl_t flops = 0.; cham_fixdbl_t coefabs = 1.; + cham_fixdbl_t M = _M; + cham_fixdbl_t N = _N; cham_fixdbl_t size; #if defined(PRECISION_z) || defined(PRECISION_c) coefabs = 3.; diff --git a/testing/testing_zlascal.c b/testing/testing_zlascal.c index 988af04f853102f9bf4c7653e108162aa33488e7..63df592df0e4d4ffbeb97a1565bd7cdf0bac3fca 100644 --- a/testing/testing_zlascal.c +++ b/testing/testing_zlascal.c @@ -23,16 +23,19 @@ #include <chameleon/flops.h> static cham_fixdbl_t -flops_zlascal( cham_uplo_t uplo, int M, int N ) +flops_zlascal( cham_uplo_t uplo, int _M, int _N ) { cham_fixdbl_t flops = 0.; - int minMN = chameleon_min( M, N ); + cham_fixdbl_t minMN = (cham_fixdbl_t)chameleon_min( _M, _N ); + cham_fixdbl_t M = _M; + cham_fixdbl_t N = _N; + switch ( uplo ) { case ChamUpper: - flops = ( minMN * ( minMN + 1 ) / 2 ) + M * chameleon_max( 0, N - M ); + flops = ( minMN * ( minMN + 1 ) / 2 ) + M * (cham_fixdbl_t)chameleon_max( 0, _N - _M ); break; case ChamLower: - flops = ( minMN * ( minMN + 1 ) / 2 ) + N * chameleon_max( 0, M - N ); + flops = ( minMN * ( minMN + 1 ) / 2 ) + N * (cham_fixdbl_t)chameleon_max( 0, _M - _N ); break; case ChamUpperLower: default: diff --git a/testing/testing_ztradd.c b/testing/testing_ztradd.c index 895c4eddabe918638bf5003306d3cc42bf29fbdb..58251a3e6eaa4358531fbbdea3aab68eb1432f47 100644 --- a/testing/testing_ztradd.c +++ b/testing/testing_ztradd.c @@ -23,16 +23,19 @@ #include <chameleon/flops.h> static cham_fixdbl_t -flops_ztradd( cham_uplo_t uplo, int M, int N ) +flops_ztradd( cham_uplo_t uplo, int _M, int _N ) { cham_fixdbl_t flops = 0.; - int minMN = chameleon_min( M, N ); + cham_fixdbl_t minMN = (cham_fixdbl_t)chameleon_min( _M, _N ); + cham_fixdbl_t M = _M; + cham_fixdbl_t N = _N; + switch ( uplo ) { case ChamUpper: - flops = ( minMN * ( minMN + 1 ) / 2 ) + M * chameleon_max( 0, N - M ); + flops = ( minMN * ( minMN + 1 ) / 2 ) + M * (cham_fixdbl_t)chameleon_max( 0, _N - _M ); break; case ChamLower: - flops = ( minMN * ( minMN + 1 ) / 2 ) + N * chameleon_max( 0, M - N ); + flops = ( minMN * ( minMN + 1 ) / 2 ) + N * (cham_fixdbl_t)chameleon_max( 0, _M - _N ); break; case ChamUpperLower: default: