Loading src/setup_vbatch.c +3 −4 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ #include <assert.h> #include <inttypes.h> #include <math.h> #include <complex.h> #include "dmrg_vbatch.h" Loading Loading @@ -299,8 +300,7 @@ void setup_vbatch( int noperator, const double tiny = 1.0/pow(2,50); for(j=0; j < n; j++) { for(i=0; i < m; i++) { double aij = Asrc[i + j*ld1]; double abs_aij = ABS(aij); double abs_aij = ABS( Asrc[i+j*ld1] ); lnnz_A += (abs_aij < tiny ) ? 0 : 1; }; }; Loading Loading @@ -401,8 +401,7 @@ void setup_vbatch( int noperator, const double tiny = 1.0/pow(2.0,50); for(j=0; j < n; j++) { for(i=0; i < m; i++) { double bij = Bsrc[i + j*ld1 ]; double abs_bij = ABS( bij ); double abs_bij = ABS( Bsrc[i+j*ld1] ); lnnz_B += (abs_bij < tiny) ? 0 : 1 ; }; }; Loading src/setup_vbatch.h +11 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,17 @@ #include "dmrg_types.h" #if defined(USE_COMPLEX_Z) #define ABS(x) cabs(x) #elif defined(USE_COMPLEX_C) #define ABS(x) cabsf(x) #elif defined(USE_FLOAT) #define ABS(x) fabsf(x) #else #define ABS(x) fabs(x) #endif #ifdef __cplusplus extern "C" { Loading Loading
src/setup_vbatch.c +3 −4 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ #include <assert.h> #include <inttypes.h> #include <math.h> #include <complex.h> #include "dmrg_vbatch.h" Loading Loading @@ -299,8 +300,7 @@ void setup_vbatch( int noperator, const double tiny = 1.0/pow(2,50); for(j=0; j < n; j++) { for(i=0; i < m; i++) { double aij = Asrc[i + j*ld1]; double abs_aij = ABS(aij); double abs_aij = ABS( Asrc[i+j*ld1] ); lnnz_A += (abs_aij < tiny ) ? 0 : 1; }; }; Loading Loading @@ -401,8 +401,7 @@ void setup_vbatch( int noperator, const double tiny = 1.0/pow(2.0,50); for(j=0; j < n; j++) { for(i=0; i < m; i++) { double bij = Bsrc[i + j*ld1 ]; double abs_bij = ABS( bij ); double abs_bij = ABS( Bsrc[i+j*ld1] ); lnnz_B += (abs_bij < tiny) ? 0 : 1 ; }; }; Loading
src/setup_vbatch.h +11 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,17 @@ #include "dmrg_types.h" #if defined(USE_COMPLEX_Z) #define ABS(x) cabs(x) #elif defined(USE_COMPLEX_C) #define ABS(x) cabsf(x) #elif defined(USE_FLOAT) #define ABS(x) fabsf(x) #else #define ABS(x) fabs(x) #endif #ifdef __cplusplus extern "C" { Loading