46 #ifndef _ENVIRONMENT_HPP_
47 #define _ENVIRONMENT_HPP_
94 #define _DEBUGlevel_ DEBUG
101 #define _DEBUGlevel -1
116 #define FORTRAN(name) name
117 #define BLAS(name) name
118 #define LAPACK(name) name
120 #define FORTRAN(name) name##_
121 #define BLAS(name) name##_
122 #define LAPACK(name) name##_
125 typedef int64_t LongInt;
127 typedef std::complex<double> Complex;
129 typedef std::complex<double> Scalar;
131 typedef double Scalar;
135 extern std::ofstream statusOFS;
141 const Int I_ZERO = 0;
143 const Int I_MINUS_ONE = -1;
144 const Real D_ZERO = 0.0;
145 const Real D_ONE = 1.0;
146 const Real D_MINUS_ONE = -1.0;
147 const Complex Z_ZERO = Complex(0.0, 0.0);
148 const Complex Z_ONE = Complex(1.0, 0.0);
149 const Complex Z_MINUS_ONE = Complex(-1.0, 0.0);
150 const Complex Z_I = Complex(0.0, 1.0);
151 const Complex Z_MINUS_I = Complex(0.0, -1.0);
152 const Scalar SCALAR_ZERO =
static_cast<Scalar
>(0.0);
153 const Scalar SCALAR_ONE =
static_cast<Scalar
>(1.0);
154 const Scalar SCALAR_MINUS_ONE =
static_cast<Scalar
>(-1.0);
155 const char UPPER =
'U';
156 const char LOWER =
'L';
160 const Real au2K = 315774.67;
161 const Real PI = 3.141592653589793;
173 void PushCallStack( std::string s );
175 void DumpCallStack();
176 #endif // ifndef _RELEASE_
185 Int overflow( Int c ) {
return traits_type::not_eof(c); }
189 : std::ios(&nullStreamBuffer_), std::ostream(&nullStreamBuffer_)
201 int nSize = backtrace(array, 25);
202 char ** symbols = backtrace_symbols(array, nSize);
204 for (
int i = 0; i < nSize; i++)
206 std::cout << symbols[i] << std::endl;
218 inline Int iround(Real a){
220 if(a>0) b = (a-Int(a)<0.5)?Int(a):(Int(a)+1);
221 else b = (Int(a)-a<0.5)?Int(a):(Int(a)-1);
226 inline void OptionsCreate(Int argc,
char** argv, std::map<std::string,std::string>& options){
228 for(Int k=1; k<argc; k=k+2) {
229 options[ std::string(argv[k]) ] = std::string(argv[k+1]);
235 inline Int Size( std::stringstream& sstm ){
237 sstm.seekg (0, std::ios::end);
238 length = sstm.tellg();
239 sstm.seekg (0, std::ios::beg);
247 #endif // _ENVIRONMENT_HPP_
Definition: environment.hpp:183
Definition: environment.hpp:195
Definition: environment.hpp:181