Commit 355b9037 authored by D'azevedo, Ed's avatar D'azevedo, Ed
Browse files

compile no error

parent 924ee8e1
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
#include <assert.h>
#include <inttypes.h>
#include <math.h>
#include <complex.h>


#include "dmrg_vbatch.h"
@@ -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;
           };
           };
@@ -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 ;
             };
             };
+11 −0
Original line number Diff line number Diff line
@@ -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" {