diff --git a/fourindex.h b/fourindex.h index e30925b..414acfb 100644 --- a/fourindex.h +++ b/fourindex.h @@ -310,7 +310,7 @@ public: fourindex_ext *base; matel4stored my; int permindex; - fourindex_ext::iterator it; + typename fourindex_ext::iterator it; //private methods void setup(void) //make a copy of *it to my with scaled element and anti/permuted indices @@ -642,9 +642,9 @@ unsigned long J = SMat_index_1(k,l); #ifdef DEBUG if (*count != 1) laerror("lval (i,j,k,l) with count > 1 in fourindex_dense"); if (I<0 || I>=(unsigned long)nn || J<0 || J>=(unsigned long)nn) laerror("fourindex_dense index out of range"); - if (!v) laerror("access to unallocated fourindex_dense"); + if (!NRSMat::v) laerror("access to unallocated fourindex_dense"); #endif -return v[SMat_index(I,J)]; +return NRSMat::v[SMat_index(I,J)]; } template @@ -655,9 +655,9 @@ unsigned long J = SMat_index_1(k,l); //I,J act as indices of a NRSmat #ifdef DEBUG if (I<0 || I>=(unsigned long)nn || J<0 || J>=(unsigned long)nn) laerror("fourindex_dense index out of range"); - if (!v) laerror("access to unallocated fourindex_dense"); + if (!NRSMat::v) laerror("access to unallocated fourindex_dense"); #endif -return v[SMat_index(I,J)]; +return NRSMat::v[SMat_index(I,J)]; } diff --git a/nonclass.cc b/nonclass.cc index 37a7ddd..5810159 100644 --- a/nonclass.cc +++ b/nonclass.cc @@ -1,6 +1,6 @@ #ifndef NONCBLAS extern "C" { -#include "atlas_enum.h" +#include "cblas.h" #include "clapack.h" } #else diff --git a/smat.h b/smat.h index fe76612..b1e0c11 100644 --- a/smat.h +++ b/smat.h @@ -183,7 +183,7 @@ NRSMat::operator+=(const NRSMat & rhs) } template<> -NRSMat< complex > & +inline NRSMat< complex > & NRSMat< complex >::operator+=(const NRSMat< complex > & rhs) { #ifdef DEBUG @@ -544,14 +544,14 @@ public: #ifdef DEBUG if(i<=0||j<=0||i>nn||j>nn) laerror("index out of range in NRSMat_from1"); #endif - return v[SMat_index_1(i,j)]; + return NRSMat::v[SMat_index_1(i,j)]; } inline T& operator() (const int i, const int j) { #ifdef DEBUG if(i<=0||j<=0||i>nn||j>nn) laerror("index out of range in NRSMat_from1"); #endif - return v[SMat_index_1(i,j)]; + return NRSMat::v[SMat_index_1(i,j)]; } }; diff --git a/t.cc b/t.cc index 7ca7df4..66569c5 100644 --- a/t.cc +++ b/t.cc @@ -2,7 +2,6 @@ #include #include "la.h" -#include "traceback.h" #include "sparsemat.h" #include "matexp.h" #include "fourindex.h" @@ -11,6 +10,9 @@ #include "conjgrad.h" #include "diis.h" #include "bitvector.h" +#ifdef USE_TRACEBACK +#include "traceback.h" +#endif extern void test(const NRVec &x); @@ -38,10 +40,14 @@ complex mycident (const complex&x) {return x;} int main() { +#ifdef USE_TRACEBACK sigtraceback(SIGSEGV,1); sigtraceback(SIGABRT,1); sigtraceback(SIGBUS,1); sigtraceback(SIGFPE,1); +#endif + + NRVec x(1.,10); NRVec y(2.,10); NRVec z(-2.,10); diff --git a/t2.cc b/t2.cc index 58f8768..501b6bc 100644 --- a/t2.cc +++ b/t2.cc @@ -1,12 +1,14 @@ #include #include "la.h" -#include "traceback.h" #include "sparsemat.h" #include "matexp.h" #include "fourindex.h" #include "bitvector.h" +#ifdef USE_TRACEBACK +#include "traceback.h" +#endif void test(const NRVec &x) { diff --git a/test.cc b/test.cc index e66bf74..84d3500 100644 --- a/test.cc +++ b/test.cc @@ -3,7 +3,9 @@ #include "la.h" #include "fourindex.h" #include "laerror.h" +#ifdef USE_TRSACEBACK #include "traceback.h" +#endif void test2(char *msg) { @@ -12,10 +14,12 @@ laerror(msg); int main(void) { +#ifdef USE_TRSACEBACK sigtraceback(SIGSEGV,1); sigtraceback(SIGABRT,1); sigtraceback(SIGBUS,1); sigtraceback(SIGFPE,1); +#endif bitvector v(100); v.fill();