*** empty log message ***
This commit is contained in:
parent
95129aee4b
commit
4c2e042e3e
10
fourindex.h
10
fourindex.h
@ -310,7 +310,7 @@ public:
|
|||||||
fourindex_ext *base;
|
fourindex_ext *base;
|
||||||
matel4stored<I,T> my;
|
matel4stored<I,T> my;
|
||||||
int permindex;
|
int permindex;
|
||||||
fourindex_ext::iterator it;
|
typename fourindex_ext::iterator it;
|
||||||
|
|
||||||
//private methods
|
//private methods
|
||||||
void setup(void) //make a copy of *it to my with scaled element and anti/permuted indices
|
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
|
#ifdef DEBUG
|
||||||
if (*count != 1) laerror("lval (i,j,k,l) with count > 1 in fourindex_dense");
|
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 (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<T>::v) laerror("access to unallocated fourindex_dense");
|
||||||
#endif
|
#endif
|
||||||
return v[SMat_index(I,J)];
|
return NRSMat<T>::v[SMat_index(I,J)];
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T, class DUMMY>
|
template<class T, class DUMMY>
|
||||||
@ -655,9 +655,9 @@ unsigned long J = SMat_index_1(k,l);
|
|||||||
//I,J act as indices of a NRSmat
|
//I,J act as indices of a NRSmat
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (I<0 || I>=(unsigned long)nn || J<0 || J>=(unsigned long)nn) laerror("fourindex_dense index out of range");
|
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<T>::v) laerror("access to unallocated fourindex_dense");
|
||||||
#endif
|
#endif
|
||||||
return v[SMat_index(I,J)];
|
return NRSMat<T>::v[SMat_index(I,J)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#ifndef NONCBLAS
|
#ifndef NONCBLAS
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "atlas_enum.h"
|
#include "cblas.h"
|
||||||
#include "clapack.h"
|
#include "clapack.h"
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
6
smat.h
6
smat.h
@ -183,7 +183,7 @@ NRSMat<double>::operator+=(const NRSMat<double> & rhs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
NRSMat< complex<double> > &
|
inline NRSMat< complex<double> > &
|
||||||
NRSMat< complex<double> >::operator+=(const NRSMat< complex<double> > & rhs)
|
NRSMat< complex<double> >::operator+=(const NRSMat< complex<double> > & rhs)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -544,14 +544,14 @@ public:
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if(i<=0||j<=0||i>nn||j>nn) laerror("index out of range in NRSMat_from1");
|
if(i<=0||j<=0||i>nn||j>nn) laerror("index out of range in NRSMat_from1");
|
||||||
#endif
|
#endif
|
||||||
return v[SMat_index_1(i,j)];
|
return NRSMat<T>::v[SMat_index_1(i,j)];
|
||||||
}
|
}
|
||||||
inline T& operator() (const int i, const int j)
|
inline T& operator() (const int i, const int j)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if(i<=0||j<=0||i>nn||j>nn) laerror("index out of range in NRSMat_from1");
|
if(i<=0||j<=0||i>nn||j>nn) laerror("index out of range in NRSMat_from1");
|
||||||
#endif
|
#endif
|
||||||
return v[SMat_index_1(i,j)];
|
return NRSMat<T>::v[SMat_index_1(i,j)];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
8
t.cc
8
t.cc
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "la.h"
|
#include "la.h"
|
||||||
#include "traceback.h"
|
|
||||||
#include "sparsemat.h"
|
#include "sparsemat.h"
|
||||||
#include "matexp.h"
|
#include "matexp.h"
|
||||||
#include "fourindex.h"
|
#include "fourindex.h"
|
||||||
@ -11,6 +10,9 @@
|
|||||||
#include "conjgrad.h"
|
#include "conjgrad.h"
|
||||||
#include "diis.h"
|
#include "diis.h"
|
||||||
#include "bitvector.h"
|
#include "bitvector.h"
|
||||||
|
#ifdef USE_TRACEBACK
|
||||||
|
#include "traceback.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern void test(const NRVec<double> &x);
|
extern void test(const NRVec<double> &x);
|
||||||
@ -38,10 +40,14 @@ complex<double> mycident (const complex<double>&x) {return x;}
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
#ifdef USE_TRACEBACK
|
||||||
sigtraceback(SIGSEGV,1);
|
sigtraceback(SIGSEGV,1);
|
||||||
sigtraceback(SIGABRT,1);
|
sigtraceback(SIGABRT,1);
|
||||||
sigtraceback(SIGBUS,1);
|
sigtraceback(SIGBUS,1);
|
||||||
sigtraceback(SIGFPE,1);
|
sigtraceback(SIGFPE,1);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
NRVec<double> x(1.,10);
|
NRVec<double> x(1.,10);
|
||||||
NRVec<double> y(2.,10);
|
NRVec<double> y(2.,10);
|
||||||
NRVec<double> z(-2.,10);
|
NRVec<double> z(-2.,10);
|
||||||
|
4
t2.cc
4
t2.cc
@ -1,12 +1,14 @@
|
|||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "la.h"
|
#include "la.h"
|
||||||
#include "traceback.h"
|
|
||||||
#include "sparsemat.h"
|
#include "sparsemat.h"
|
||||||
#include "matexp.h"
|
#include "matexp.h"
|
||||||
#include "fourindex.h"
|
#include "fourindex.h"
|
||||||
#include "bitvector.h"
|
#include "bitvector.h"
|
||||||
|
|
||||||
|
#ifdef USE_TRACEBACK
|
||||||
|
#include "traceback.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test(const NRVec<double> &x)
|
void test(const NRVec<double> &x)
|
||||||
{
|
{
|
||||||
|
4
test.cc
4
test.cc
@ -3,7 +3,9 @@
|
|||||||
#include "la.h"
|
#include "la.h"
|
||||||
#include "fourindex.h"
|
#include "fourindex.h"
|
||||||
#include "laerror.h"
|
#include "laerror.h"
|
||||||
|
#ifdef USE_TRSACEBACK
|
||||||
#include "traceback.h"
|
#include "traceback.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test2(char *msg)
|
void test2(char *msg)
|
||||||
{
|
{
|
||||||
@ -12,10 +14,12 @@ laerror(msg);
|
|||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_TRSACEBACK
|
||||||
sigtraceback(SIGSEGV,1);
|
sigtraceback(SIGSEGV,1);
|
||||||
sigtraceback(SIGABRT,1);
|
sigtraceback(SIGABRT,1);
|
||||||
sigtraceback(SIGBUS,1);
|
sigtraceback(SIGBUS,1);
|
||||||
sigtraceback(SIGFPE,1);
|
sigtraceback(SIGFPE,1);
|
||||||
|
#endif
|
||||||
|
|
||||||
bitvector v(100);
|
bitvector v(100);
|
||||||
v.fill();
|
v.fill();
|
||||||
|
Loading…
Reference in New Issue
Block a user