|
TBCI Numerical high perf. C++ Library
2.8.0
|
Provides some macros which are used throughout the library files. More...
#include "tbci/tbci_version.h"#include "tbci/config_manual.h"#include <iostream>#include <fstream>#include <iomanip>#include <string>#include <cstring>#include <cstdarg>#include <cstdlib>#include <cmath>#include "tbci/except.h"#include "perf_opt.h"#include "tbci_traits.h"#include "tbci_param.h"#include "plain_def.h"#include "malloc_cache.h"#include "cost.h"
Go to the source code of this file.
Classes | |
| class | TBCI::vec_fill_fn< T > |
Namespaces | |
| TBCI | |
| The TBCI Numerical Library is put into TBCI namespace, if the compiler supports it (egcs-1.1.x and later for example) | |
| CPLX__ | |
| std | |
Macros | |
| #define | HAVE_UNIX 1 |
| #define | USE_NS |
| #define | SIGNATURE class |
| #define | RESTRICT |
| #define | LIKELY(expr) (expr) |
| branch prediction note that we sometimes on purpose mark the unlikely possibility likely and vice versa to optimize the fast path. More... | |
| #define | UNLIKELY(expr) (expr) |
| #define | TBCI_DLLEXPORT |
| #define | TBCI_DLLLOCAL |
| #define | FGD |
| #define | FGDT |
| #define | FGDU |
| #define | FGDTD |
| #define | FGDDT |
| #define | FGDCT |
| #define | FGDR |
| #define | ISTRINGSTREAM istrstream |
| strstream vs. s(tring)stream More... | |
| #define | OSTRINGSTREAM ostrstream |
| #define | STRINGSTREAM strstream |
| #define | LONG_DOUBLE double |
| #define | LONG_LONG long |
| #define | INST(x) |
| #define | INST2(x, y) |
| #define | INST3(x, y, z) |
| #define | INST4(x, y, z, a) |
| #define | INST5(x, y, z, a, b) |
| #define | INST6(x, y, z, a, b, c) |
| #define | NOINST |
| #define | INSTCTL(x) |
| #define | NULL (0) |
| #define | NAMESPACE_TBCI namespace TBCI { |
| #define | NAMESPACE_STD namespace std { |
| #define | NAMESPACE_CSTD namespace std { |
| #define | NAMESPACE_GRID namespace Grid { |
| #define | NAMESPACE_FD namespace Finite_Difference { |
| #define | NAMESPACE_CPLX namespace std { |
| #define | NAMESPACE_END } /* namespace */ |
| #define | NAMESPACE_STD_END } /* namespace std */ |
| #define | NAMESPACE_CSTD_END } /* namespace std */ |
| #define | NAMESPACE_CPLX_END } /* namespace std */ |
| #define | USING_TBCI using namespace TBCI; |
| #define | USING_GRID using namespace Grid; |
| #define | USING_FD using namespace Finite_Difference; |
| #define | USING_END using namespace std; /* Don't use! */ |
| #define | USING_STD using namespace std; |
| #define | TBCI__ TBCI:: |
| #define | __TBCI__ ::TBCI:: |
| #define | FRIEND_TBCI__ /* */ |
| #define | FRIEND_TBCI2__ /* */ |
| #define | GRID__ Grid:: |
| #define | FD__ FD:: |
| #define | STD__ std:: |
| #define | MATH__ std:: |
| #define | CSTD__ std:: |
| #define | CPLX__ std:: |
| #define | GLBL__ /* not needed if ::std:: is used */ |
| #define | GLBL2__ /* not needed if ::TBCI:: is used */ |
| #define | ABORT_RET(x) return x |
| Note (KG, 2001-06-06): Eventually MATH__ and CSTD__ are the same on all systems and thus all MATH__ could be replaced by CSTD__ . More... | |
| #define | ABORT_RET_NR do {} while (0) |
| #define | MIN_ALIGN 8 |
| #define | MIN_ALIGN2 16 |
| #define | ALIGN3(v, i, x) v(i) |
| #define | ALIGN2(v, x) v |
| #define | ALIGN(x) |
| #define | TALIGN(x) |
| #define | CONSTA |
| #define | TBCI_CONST(x) x |
| #define | REGPARMA(n) |
| #define | REGPARM(n, x) x |
| #define | UNUSED |
| #define | WEAKA |
| #define | WEAK(x) x |
| #define | TWEAK(x) x |
| #define | HOT |
| #define | COLD |
| #define | HOTDECL(x) x |
| #define | COLDDECL(x) x |
| #define | __PRETTY_FUNCTION__ "<unknown>" |
| #define | TBCIERRH1 __PRETTY_FUNCTION__ |
| #define | TBCIERRM(cond, exc, txt, ind) |
| #define | TBCIERRS(cond, exc, txt, ind) |
| #define | BCHK(cond, exc, txt, ind, rtval) |
| #define | BCHKNR(cond, exc, txt, ind) |
| #define | EXPCHK(cond, exc, txt, ind, rtval) do {} while(0) |
| #define | EXPCHKNR(cond, exc, txt, ind) do {} while(0) |
| #define | MIN(a, b) ((a) < (b)? (a) : (b)) |
| #define | MAX(a, b) ((a) > (b)? (a) : (b)) |
| #define | INFO(x) |
| #define | RET(x) |
| #define | CONSTR(x) x |
| #define | _VOID |
| #define | INLINE inline |
| #define | OMP_FOR |
| #define | OMP_FOR_REDUCE_F2 |
| #define | OMP_FOR_REDUCE_F1F2 |
| #define | PREFETCH_R(addr, loc) do {} while (0) |
| In case gcc does not yet support __builtin_prefetch(), we have handcoded assembly with gcc for a few architectures. More... | |
| #define | PREFETCH_W(addr, loc) do {} while (0) |
| #define | THREAD__ |
| #define | MAIN_PID (getpid()) |
| #define | num_threads (0) |
| #define | thrno (0) |
| #define | ismainthread (1) |
| #define | VEC_INLINE inline |
| #define | COPY2(res, v1, f1, f2) res = v1 |
| #define | TBCICOPY(n, o, t, s) _par_copy < t > (s,n,o) |
| #define | VEC_INLINE /*inline*/ |
| #define | FILL1(res, f1, f2) res = f2 |
| #define | TBCIFILL(n, v, t, s) _par_fill < t > (s,n,v) |
| #define | TBCICLEAR(n, t, s) _par_fill < t > (s,n,t(0)) |
| #define | _TBCICOMP(n, o, t, s) |
| #define | VEC_INLINE /*inline*/ |
| #define | COMP2(r, v1, f1, f2) if (r != v1) { ++f2; i = sz; goto _fin; /* break; */ } |
| #define | TBCICOMP(n, o, t, s) _par_comp< t > (s, n, o) |
| #define | _REF_ |
| #define | FABSSQR(T) |
| #define | FABS(T) |
| #define | SQRT(T) |
| #define | ABS(T) |
| #define | VEC_INLINE |
Typedefs | |
| typedef enum _vararg | TBCI::vararg |
Enumerations | |
| enum | TBCI::_vararg { TBCI::vag0 =0, TBCI::vag1, TBCI::vag2, TBCI::vag3, TBCI::vag4, TBCI::vag5, TBCI::vag6, TBCI::vag7, TBCI::vag8, TBCI::vag9, TBCI::vag10, TBCI::vag11, TBCI::vag12, TBCI::vag13, TBCI::vag14, TBCI::vag15, TBCI::vag16 } |
| This is a helper type to identify and count varargs. More... | |
Functions | |
| template<typename T > | |
| void | TBCI::SWAP (T &a, T &b) |
| SWAP function Note: We could implement a swap function without temporaries: a -= b b += a a -= b a = -a That's four arithmetic operations to save one temporary and it can be only done for integers. More... | |
| template<typename T > | |
| void | TBCI::_tbci_copy (const unsigned long sz, T *const res, const T *const v1) |
| template<typename T > | |
| void | TBCI::_par_copy (const unsigned long sz, T *v1, const T *v2) |
| template<typename T > | |
| void | TBCI::_tbci_fill (const unsigned long sz, T *const res, register typename tbci_traits< T >::loop_const_refval_type f2) |
| template<typename T > | |
| void | TBCI::_par_fill (const unsigned long, T *const, typename tbci_traits< T >::loop_const_refval_type) |
| template<typename T > | |
| void | TBCI::_tbci_fill_fn (const unsigned long sz, T *vec, vec_fill_fn< T > fn, void *par) |
| template<typename T > | |
| void | TBCI::do_vv_comp (const unsigned long sz, const T *const v1, const T *const v2, volatile long &_f2) |
| f2 = number of differences vec, vec More... | |
| template<typename T > | |
| int | TBCI::_par_comp (const unsigned long sz, const T *v1, const T *v2) |
| template<typename T > | |
| unsigned long | TBCI::_bin_search (const T *vec, T el, unsigned long start, unsigned long end) |
| Search for an element el in a sorted vector between start and end-1, returns (unsigned long)-1 if element is not found. More... | |
| template<typename T > | |
| unsigned long | TBCI::bin_search (const T *vec, T el, unsigned long start, unsigned long end) |
| Search for an element el in a sorted vector between start and end-1, returns (unsigned long)-1 if element is not found. More... | |
| int | std::conj (const int arg) |
| conj for elementary types More... | |
| unsigned | std::conj (const unsigned arg) |
| long | std::conj (const long arg) |
| short | std::conj (const short arg) |
| char | std::conj (const char arg) |
| float | std::conj (const float arg) |
| double | std::conj (const double arg) |
| int | std::real (const int d) |
| unsigned | std::real (const unsigned d) |
| float | std::real (const float d) |
| double | std::real (const double d) |
| int | std::imag (const int d) |
| unsigned | std::imag (const unsigned d) |
| float | std::imag (const float d) |
| double | std::imag (const double d) |
| template<typename T > | |
| int | TBCI::sign (const T &x) |
| Signum. More... | |
| double | TBCI::fabssqr (const double a) |
| double | TBCI::fabssqr (const float a) |
| double | TBCI::fabssqr (const int a) |
| double | TBCI::fabssqr (const unsigned a) |
| template<typename T > | |
| T | TBCI::sqr (const T &a) |
| template<typename T > | |
| T | TBCI::dot (const T &a1, const T &a2) |
| double | std::fabs (const int a) |
| double | std::sqrt (const int a) |
| double | std::fabs (const unsigned int a) |
| unsigned | std::abs (const unsigned a) |
Provides some macros which are used throughout the library files.
basics.h should be included from any file. It contains basics definitions and macros used thoughout the library code.
The knowledge about compilers has been moved to config_manual.h, hooray! Next step will be to generate it with autoconf ...
The basics.h file is still a collection of awful stuff, but it's getting better.
Definition in file basics.h.
| #define _REF_ |
Definition at line 1034 of file basics.h.
Referenced by std::conj(), std::imag(), and std::real().
| #define _TBCICOMP | ( | n, | |
| o, | |||
| t, | |||
| s | |||
| ) |
Note (KG, 2001-06-06): Eventually MATH__ and CSTD__ are the same on all systems and thus all MATH__ could be replaced by CSTD__ .
The difference to STD__ is that STD__ refers to the C++ stuff in the namespace std::, while the CSTD__ (and MATH__) refers to C stuff which is wrapped into std:: by including cXXX headers
| #define ABS | ( | T | ) |
| #define ALIGN | ( | x | ) |
attributes definitions for alignment, weak, const, regparm, ...
Definition at line 437 of file basics.h.
Referenced by F_TSMatrix< T >::fabs(), FS_Vector< dims, T >::max(), Vector< T >::max(), FS_Vector< dims, T >::min(), Vector< T >::min(), F_TSMatrix< T >::operator*(), TSMatrix< T >::operator*(), F_Matrix< T >::operator*(), Matrix< T >::operator*(), Vector< T >::operator/(), operator>>(), FS_Vector< dims, T >::sum(), Vector< T >::sum(), TBCI::SWAP(), and BdMatrix< T >::trace().
| #define ALIGN2 | ( | v, | |
| x | |||
| ) | v |
Definition at line 436 of file basics.h.
Referenced by LU_bkw_subst(), lu_decomp(), LU_det(), LU_fwd_subst(), ILU0_Symm_BdMatrixPreconditioner< T >::solve(), and ILU0_BdMatrixPreconditioner< T >::solve().
Definition at line 435 of file basics.h.
Referenced by do_mat_vec_transmult(), do_old_mat_mat_mult(), dot(), F_TSMatrix< T >::operator*(), TSMatrix< T >::operator*(), F_Matrix< T >::operator*(), F_TMatrix< T >::trace(), and TMatrix< T >::trace().
| #define BCHK | ( | cond, | |
| exc, | |||
| txt, | |||
| ind, | |||
| rtval | |||
| ) |
Definition at line 568 of file basics.h.
Referenced by BdMatrix< T >::adddiag(), tbci_memalloc_cache< T >::alloc(), BVector< T >::append(), BdMatrix< T >::autoinsert(), bvfillm(), CTensor< T >::calc_indx(), CTensor< T >::calc_offs(), cediv(), cemul(), BVector< T >::cheapdownsize(), TMatrix< T >::cheapdownsizerow(), F_TMatrix< T >::clear(), Tensor< T >::cntrmul(), Tensor< T >::contract(), CSCMatrix< T >::cscm_vec_mul_exact(), ctrmul(), tbci_memalloc_cache< T >::dealloc(), BdMatrix< T >::div_row(), Matrix< T >::div_row(), BdMatrix< T >::div_rows(), Matrix< T >::div_rows(), do_fbdmat_vec_mul(), dot(), BdMatrix< T >::dotMult(), ediv(), emul(), BdMatrix< T >::expand(), fabssqr(), TMatrix< T >::fill(), tbci_memalloc_cache< T >::find_by_sz(), gaussj(), F_BandMatrix< T >::get_col(), BdMatrix< T >::get_col(), TMatrix< T >::get_col(), CRMatrix< T >::get_row(), F_TMatrix< T >::get_row(), BdMatrix< T >::get_row(), CTensor< T >::getcref(), HOTDECL(), Index::idx_fill_in1(), Index::idx_fill_in2(), Index::idx_remove1(), Index::idx_remove2(), Index::idx_set1(), FS_Vector< dims, T >::incr(), TVector< T >::incr(), TSVector< T >::incr(), Vector< T >::incr(), tbci_memalloc_cache< T >::init(), LU_bkw_subst(), lu_decomp(), LU_det(), LU_fwd_subst(), LU_invert(), lu_solve(), Vector< T >::max(), metrmul(), Vector< T >::min(), CSCMatrix< T >::mult(), CSCMatrix< T >::mult1(), BdMatrix< T >::mult_row(), Matrix< T >::mult_row(), BdMatrix< T >::mult_rows(), Matrix< T >::mult_rows(), CSCMatrix< T >::multf(), Index::next_idx(), F_BandMatrix< T >::operator()(), FS_Vector< dims, T >::operator()(), CRMatrix< T >::operator()(), CTensor< T >::operator()(), F_TMatrix< T >::operator()(), F_Matrix< T >::operator()(), Matrix< T >::operator()(), CRMatrix< T >::operator*(), CSCMatrix< T >::operator*(), BdMatrix< T >::operator*(), F_TSMatrix< T >::operator*(), TSMatrix< T >::operator*(), F_Matrix< T >::operator*(), Vector< T >::operator*(), Matrix< T >::operator*(), TVector< T >::operator+(), CSCMatrix< T >::operator+(), TMatrix< T >::operator+(), Tensor< T >::operator+(), operator+(), TSVector< T >::operator+(), TSMatrix< T >::operator+(), Vector< T >::operator+(), Matrix< T >::operator+(), TVector< T >::operator+=(), TMatrix< T >::operator+=(), Tensor< T >::operator+=(), TVector< T >::operator-(), CSCMatrix< T >::operator-(), TMatrix< T >::operator-(), Tensor< T >::operator-(), operator-(), TSVector< T >::operator-(), TSMatrix< T >::operator-(), Vector< T >::operator-(), Matrix< T >::operator-(), TVector< T >::operator-=(), TMatrix< T >::operator-=(), Tensor< T >::operator-=(), FS_Vector< dims, T >::operator/(), F_TMatrix< T >::operator/(), TMatrix< T >::operator/(), operator/(), F_Matrix< T >::operator/(), Vector< T >::operator/(), Matrix< T >::operator/(), FS_Vector< dims, T >::operator/=(), TVector< T >::operator/=(), F_TMatrix< T >::operator/=(), TMatrix< T >::operator/=(), BdMatrix< T >::operator/=(), BVector< T >::operator<=(), F_BandMatrix< T >::operator=(), TVector< T >::operator=(), F_TMatrix< T >::operator=(), CRMatrix< T >::operator=(), BVector< T >::operator=(), TMatrix< T >::operator=(), BdMatrix< T >::operator=(), Vector< T >::operator==(), BVector< T >::operator>=(), FS_Vector< dims, T >::operator[](), Index::prev_idx(), BVector< T >::remove(), BVector< T >::resize(), CRMatrix< T >::setunit(), CSCMatrix< T >::setunit(), F_TMatrix< T >::setunit(), TMatrix< T >::setunit(), CRMatrix< T >::setval(), BdMatrix< T >::setval(), TVector< T >::slice(), slice(), Vector< T >::slice(), ILU0_BdMatrixPreconditioner< T >::solve(), thread_dereg_callback(), F_TMatrix< T >::trace(), TMatrix< T >::trace(), F_BandMatrix< T >::transMult(), CRMatrix< T >::transMult(), CSCMatrix< T >::transMult(), BdMatrix< T >::transMult(), Matrix< T >::transMult(), CTensor< T >::transpose(), DiagPreconditioner< T, MatrixType >::update(), DILU_BdMatrixPreconditioner< T >::update(), and ILU0_BdMatrixPreconditioner< T >::update().
| #define BCHKNR | ( | cond, | |
| exc, | |||
| txt, | |||
| ind | |||
| ) |
Definition at line 579 of file basics.h.
Referenced by _thread_start_off(), BdMatrix< T >::adddiag(), TMatrix< T >::alias(), CRMatrix< T >::allocate(), F_BandMatrix< T >::allocate(), CSCMatrix< T >::allocate(), BdMatrix< T >::BdMatrix(), BdMatrix< T >::constructor(), CRMatrix< T >::copy(), F_BandMatrix< T >::copy(), CSCMatrix< T >::copy(), F_BandMatrix< T >::F_BandMatrix(), FS_Vector< dims, T >::FS_Vector(), CSCMatrix< T >::insert(), CRMatrix< T >::MatVecMult(), CSCMatrix< T >::MatVecMult(), metrmul(), CTensor< T >::operator()(), F_BandMatrix< T >::set_col(), F_TMatrix< T >::set_col(), TMatrix< T >::set_col(), TMatrix< T >::set_col_partial(), CRMatrix< T >::set_row(), F_TMatrix< T >::set_row(), TMatrix< T >::set_row(), TMatrix< T >::set_row_partial(), F_BandMatrix< T >::setval(), TMatrix< T >::size(), DILU_BdMatrixPreconditioner< T >::solve(), thread_wait(), thread_wait_result(), TMatrix< T >::TMatrix(), and BdMatrix< T >::~BdMatrix().
| #define COLD |
Definition at line 489 of file basics.h.
Referenced by BdMatrix< T >::resize().
| #define CSTD__ std:: |
Definition at line 333 of file basics.h.
Referenced by cplx< T >::abs(), TSVector< T >::abs(), BdMatrix< T >::autoinsert(), BdMatrix< T >::check_internal(), CSCMatrix< T >::clear(), F_BandMatrix< T >::copy(), tbci_memalloc_cache< T >::dealloc(), detect_num_cpu(), free_threads(), FS_Vector< dims, T >::FS_Vector(), tbci_memalloc_cache< T >::init(), FS_Vector< dims, T >::init_0(), init_threads(), FS_Vector< dims, T >::operator BVector< T >(), operator<<(), F_BandMatrix< T >::operator=(), FS_Vector< dims, T >::operator=(), FS_Vector< dims, T >::operator==(), FS_Vector< dims, T >::operator>(), operator>>(), BdMatrix< T >::setval(), slice(), tbci_memalloc_cache< T >::smp_deinit(), TSVector< T >::sum(), BdMatrix< T >::~BdMatrix(), and NumErr::~NumErr().
| #define EXPCHK | ( | cond, | |
| exc, | |||
| txt, | |||
| ind, | |||
| rtval | |||
| ) | do {} while(0) |
Definition at line 623 of file basics.h.
Referenced by BdMatrix< T >::check(), CSCMatrix< T >::get(), Symm_BdMatrix< T >::operator()(), BVector< T >::operator()(), TMatrix< T >::operator()(), Matrix< T >::operator()(), operator<<(), TMatrix< T >::operator[](), Mat_Brack< T >::operator[](), and DiagPreconditioner< T, MatrixType >::update().
| #define EXPCHKNR | ( | cond, | |
| exc, | |||
| txt, | |||
| ind | |||
| ) | do {} while(0) |
Definition at line 624 of file basics.h.
Referenced by CSCMatrix< T >::setval().
| #define FABS | ( | T | ) |
| #define FABSSQR | ( | T | ) |
| #define FGD |
Definition at line 137 of file basics.h.
Referenced by BVector< unsigned >::init_0(), F_BandMatrix< T >::ldab(), FS_Vector< dims, T >::operator!=(), BdMatrix< T >::operator!=(), F_Matrix< T >::operator!=(), F_TMatrix< T >::operator*(), TMatrix< T >::operator*(), Tensor< T >::operator-(), F_TSMatrix< T >::operator-(), FS_Vector< dims, T >::operator>(), BVector< unsigned >::operator>(), CTensor< T >::rank_size(), and BdMatrix< T >::trace().
| #define FGDT |
Definition at line 138 of file basics.h.
Referenced by Matrix< T >::operator!=(), BdMatrix< T >::setoutopts(), and TSVector< T >::sum().
| #define FRIEND_TBCI2__ /* */ |
Definition at line 328 of file basics.h.
Referenced by Matrix< T >::clear(), BVector< unsigned >::init_0(), Matrix< T >::operator!=(), Tensor< T >::operator-(), BdMatrix< T >::setoutopts(), and TVector< T >::TVector().
| #define FRIEND_TBCI__ /* */ |
Definition at line 327 of file basics.h.
Referenced by F_TMatrix< T >::operator*(), TMatrix< T >::operator*(), F_TSMatrix< T >::operator-(), TSMatrix< T >::operator-(), TSMatrix< T >::operator/(), and TSVector< T >::sum().
| #define GLBL2__ /* not needed if ::TBCI:: is used */ |
Definition at line 336 of file basics.h.
Referenced by TSVector< T >::fabssqr(), and TSMatrix< T >::fabssqr().
| #define GLBL__ /* not needed if ::std:: is used */ |
Definition at line 335 of file basics.h.
Referenced by cplx< T >::abs(), TSVector< T >::abs(), cplx< T >::acos(), cplx< T >::acosh(), cplx< T >::asin(), cplx< T >::asinh(), cplx< T >::exp(), fabs(), cplx< T >::fabs(), TMatrix< T >::fabs(), TSVector< T >::fabs(), TSMatrix< T >::fabs(), Matrix< T >::fabs(), cplx< T >::ln(), operator<=(), cplx< T >::power(), and cplx< T >::sqrt().
| #define HOT |
Definition at line 488 of file basics.h.
Referenced by TVector< T >::abs(), BVector< unsigned >::alias(), BdMatrix< T >::BdMatrix(), CSCMatrix< T >::do_export(), BVector< unsigned >::init_0(), Matrix< T >::Matrix(), TVector< T >::operator!=(), BdMatrix< T >::operator!=(), TMatrix< T >::operator*(), Vector< unsigned >::operator*(), TSVector< T >::operator-(), Matrix< T >::operator-(), TVector< T >::operator-=(), BVector< unsigned >::operator=(), Vector< unsigned >::operator>(), TMatrix< T >::operator[](), BVector< unsigned >::push_back(), BdMatrix< T >::setoutopts(), CSCMatrix< T >::size(), and TMatrix< T >::TMatrix().
| #define INST | ( | x | ) |
Definition at line 231 of file basics.h.
Referenced by abs(), acos(), acosh(), TSVector< T >::add_t_tsv(), arg(), asin(), asinh(), atan(), atanh(), cediv(), cemul(), BVector< T >::concat(), conj(), cos(), cosh(), TSVector< T >::detach(), do_bdmat_vec_dotmult(), dot(), ediv(), emul(), exp(), fabs(), fabssqr(), Vector< T >::fabssqr(), HOTDECL(), Index::idx_fill_in1(), Index::idx_fill_in2(), Index::idx_remove1(), Index::idx_remove2(), Index::idx_set1(), imag(), TVector< T >::incr(), TSVector< T >::incr(), job_bdmat_vec_mult(), job_svc_svc_add(), job_svc_svc_sub(), job_svc_val_add(), job_svc_val_sub(), job_svc_vec_add(), job_svc_vec_sub(), job_val_add_vec(), job_val_div_vec(), job_val_sub_vec(), job_val_svc_add(), job_val_svc_sub(), job_val_vec_add(), job_val_vec_div(), job_val_vec_mul(), job_val_vec_sub(), job_vec_add_svc(), job_vec_add_val(), job_vec_add_vec(), job_vec_div_val(), job_vec_mul_val(), job_vec_sub_svc(), job_vec_sub_svc_inv(), job_vec_sub_val(), job_vec_sub_vec(), job_vec_sub_vec_inv(), job_vec_svc_add(), job_vec_svc_sub(), job_vec_val_add(), job_vec_val_mul(), job_vec_val_sub(), job_vec_vec_add(), job_vec_vec_sub(), kahan_sum(), log(), LU_bkw_subst(), lu_decomp(), LU_det(), lu_det(), LU_fwd_subst(), LU_invert(), LU_solve(), lu_solve(), CRMatrix< T >::MatVecMult(), CSCMatrix< T >::MatVecMult(), Vector< T >::max(), Tensor< T >::mult(), CSCMatrix< T >::mult1(), CSCMatrix< T >::multf(), norm(), norm_1(), BdMatrix< T >::operator*(), operator*(), operator+(), TVector< T >::operator-(), operator-(), cplx< T >::operator/(), Vector< T >::operator/(), operator<(), operator<=(), TVector< T >::operator=(), Vector< T >::operator==(), operator>(), operator>=(), operator>>(), cplx< T >::operator~(), polar(), pow(), sin(), sinh(), sqr(), sqrt(), TSVector< T >::sub_t_tsv(), sv_decomp_backsub(), tan(), tanh(), cplx< T >::theta(), F_BandMatrix< T >::transpose(), CRMatrix< T >::transpose(), CSCMatrix< T >::transpose(), BdMatrix< T >::transpose(), and Vector< unsigned >::Vector().
Definition at line 232 of file basics.h.
Referenced by cediv(), fabs(), fix_condition(), max(), min(), operator-(), sum(), sv_decomp(), sv_decomp_backsub(), sv_decomp_pythag(), and svd_solve().
Definition at line 233 of file basics.h.
Referenced by operator*(), and operator+().
| #define INSTCTL | ( | x | ) |
Definition at line 238 of file basics.h.
Referenced by operator*().
| #define ISTRINGSTREAM istrstream |
| #define LIKELY | ( | expr | ) | (expr) |
branch prediction note that we sometimes on purpose mark the unlikely possibility likely and vice versa to optimize the fast path.
Definition at line 100 of file basics.h.
Referenced by TSVector< T >::add_t_tsv(), BdMatrix< T >::adddiag(), BdMatrix< T >::autoinsert(), BiCGSTAB(), BVector< T >::BVector(), BVector< unsigned >::BVector(), TMatrix< T >::cheapdownsizerow(), BdMatrix< T >::check_internal(), TSVector< T >::clone(), TSMatrix< T >::clone(), BdMatrix< T >::constructor(), BVector< T >::destroy(), TSVector< T >::destroy(), TSVector< T >::detach(), TSMatrix< T >::detach(), do_bdmat_vec_dotmult(), do_bdmat_vec_mult(), do_bdmat_vec_mult_lnw(), do_bdmat_vec_transmult_lnw(), do_mat_vec_transmult(), do_old_mat_mat_mult(), dot(), BdMatrix< T >::expand(), F_TMatrix< T >::F_TMatrix(), Vector< T >::fabssqr(), tbci_memalloc_cache< T >::find_and_rmv(), tbci_memalloc_cache< T >::free_and_enter(), BdMatrix< T >::get(), BdMatrix< T >::get_col(), BdMatrix< T >::get_row(), HOTDECL(), lu_decomp(), Vector< T >::max(), Vector< T >::min(), BdMatrix< T >::operator TMatrix< T >(), BdMatrix< T >::operator()(), BdMatrix< T >::operator*(), Vector< T >::operator*(), Matrix< T >::operator*(), TVector< T >::operator+(), TSVector< T >::operator+(), TSMatrix< T >::operator+(), Vector< T >::operator+(), TVector< T >::operator+=(), TVector< T >::operator-(), TSVector< T >::operator-(), TSMatrix< T >::operator-(), Vector< T >::operator-(), TVector< T >::operator-=(), TVector< T >::operator=(), TVector< T >::operator==(), BVector< T >::operator==(), BdMatrix< T >::operator==(), TMatrix< T >::operator==(), TSVector< T >::operator==(), TSMatrix< T >::operator==(), Vector< T >::operator==(), Matrix< T >::operator==(), par_fill(), TSMatrix< T >::real_destroy(), BVector< T >::resize(), F_TMatrix< T >::resize(), TMatrix< T >::resize(), TMatrix< T >::row_expand(), TMatrix< T >::set_ptrs(), TMatrix< T >::setunit(), BdMatrix< T >::setval(), TBCI::sign(), ILU0_Symm_BdMatrixPreconditioner< T >::solve(), TSVector< T >::sub_t_tsv(), Vector< T >::sum(), cplx< T >::theta(), TMatrix< T >::TMatrix(), BdMatrix< T >::transMult(), Matrix< T >::transMult(), DILU_BdMatrixPreconditioner< T >::update(), and Vector< T >::Vector().
| #define MATH__ std:: |
Definition at line 332 of file basics.h.
Referenced by FS_Vector< dims, T >::abs(), cplx< T >::abs(), Vector< unsigned >::abs(), cplx< T >::acos(), cplx< T >::acosh(), cplx< T >::asin(), cplx< T >::asinh(), BdMatrix< T >::autoinsert(), basis_trafo(), besselh1(), besselh2(), besseli(), besselj(), besselk(), bessely(), BiCG(), BiCGSTAB(), CGS(), Symm_BdMatrix< T >::construct(), cplx< T >::exp(), BdMatrix< T >::expand(), expi(), expm3(), fabs(), FS_Vector< dims, T >::fabs(), cplx< T >::fabs(), TMatrix< T >::fabs(), F_TSMatrix< T >::fabs(), TSVector< T >::fabs(), TSMatrix< T >::fabs(), F_Matrix< T >::fabs(), Vector< unsigned >::fabs(), Matrix< T >::fabs(), CSCMatrix< T >::fill(), fix_condition(), gaussj(), cplx< T >::ln(), lu_decomp(), lu_solve(), norm_1(), BdMatrix< T >::operator TMatrix< T >(), operator<(), operator<=(), BdMatrix< T >::operator==(), operator>(), FS_Vector< dims, T >::operator>(), operator>=(), cplx< T >::power(), QMR(), cplx< T >::sqrt(), TSVector< T >::sum(), sv_decomp(), and sv_decomp_pythag().
Definition at line 649 of file basics.h.
Referenced by do_bdmat_vec_dotmult(), do_bdmat_vec_mult(), do_bdmat_vec_mult_diagw_exact(), do_bdmat_vec_transmult(), do_bdmat_vec_transmult_diagw_exact(), expm(), expm2(), expm3(), F_BandMatrix< T >::F_BandMatrix(), fix_condition(), init_threads(), lu_decomp(), LU_fwd_subst(), norm_1(), BdMatrix< T >::operator TMatrix< T >(), BdMatrix< T >::operator*(), operator+(), operator-(), sv_decomp(), and F_BandMatrix< T >::transposed_copy().
Safe MIN/MAX macros
Definition at line 648 of file basics.h.
Referenced by BdMatrix< T >::constructor(), do_bdmat_vec_dotmult(), do_bdmat_vec_mult(), do_bdmat_vec_mult_diagw_exact(), do_bdmat_vec_mult_lnw_opt(), do_bdmat_vec_transmult(), do_bdmat_vec_transmult_diagw_exact(), do_bdmat_vec_transmult_lnw_opt(), do_fbdmat_vec_mul(), F_BandMatrix< T >::F_BandMatrix(), FS_Vector< dims, T >::FS_Vector(), LU_bkw_subst(), lu_decomp(), BdMatrix< T >::operator TMatrix< T >(), BdMatrix< T >::operator*(), BdMatrix< T >::reconfig(), BdMatrix< T >::removediag(), CSCMatrix< T >::resize(), F_TMatrix< T >::resize(), BdMatrix< T >::resize(), TMatrix< T >::resize(), F_TMatrix< T >::setunit(), TMatrix< T >::setunit(), slice(), sv_decomp(), F_BandMatrix< T >::transMult(), and F_BandMatrix< T >::transposed_copy().
| #define MIN_ALIGN 8 |
Definition at line 414 of file basics.h.
Referenced by cplx< T >::div(), do_bdmat_vec_dotmult(), do_bdmat_vec_mult_lnw(), do_bdmat_vec_transmult_lnw(), do_bdmat_vec_transmult_lnw_opt(), expi(), FS_Vector< dims, T >::max(), Vector< T >::max(), FS_Vector< dims, T >::min(), Vector< T >::min(), BdMatrix< T >::operator*(), F_TSMatrix< T >::operator*(), operator*(), cplx< T >::operator*=(), cplx< T >::operator/(), Vector< T >::operator/(), cplx< T >::operator/=(), BdMatrix< T >::operator/=(), operator>>(), FS_Vector< dims, T >::sum(), Vector< T >::sum(), TBCI::SWAP(), and BdMatrix< T >::trace().
| #define MIN_ALIGN2 16 |
Definition at line 417 of file basics.h.
Referenced by do_bdmat_vec_dotmult(), do_bdmat_vec_mult_lnw_opt(), do_mat_vec_transmult(), do_old_mat_mat_mult(), dot(), LU_bkw_subst(), lu_decomp(), LU_det(), LU_fwd_subst(), F_TSMatrix< T >::operator*(), TSMatrix< T >::operator*(), F_Matrix< T >::operator*(), Matrix< T >::operator*(), ILU0_Symm_BdMatrixPreconditioner< T >::solve(), ILU0_BdMatrixPreconditioner< T >::solve(), F_TMatrix< T >::trace(), and TMatrix< T >::trace().
| #define NAMESPACE_CPLX namespace std { |
Definition at line 315 of file basics.h.
Referenced by fabs(), and operator>>().
| #define NAMESPACE_CPLX_END } /* namespace std */ |
Definition at line 319 of file basics.h.
Referenced by fabs(), std::imag(), norm(), and operator<=().
| #define NAMESPACE_CSTD namespace std { |
Definition at line 312 of file basics.h.
Referenced by TBCI::dot(), fabs(), std::fabs(), fabssqr(), TVector< T >::incr(), cplx< T >::operator<=(), polar(), sum(), F_TMatrix< T >::swap(), and TMatrix< T >::transpose().
| #define NAMESPACE_CSTD_END } /* namespace std */ |
Definition at line 318 of file basics.h.
Referenced by abs(), std::fabs(), fabs(), log10(), and cplx< T >::operator<=().
| #define NAMESPACE_END } /* namespace */ |
Definition at line 316 of file basics.h.
Referenced by bessely(), BiCG(), BiCGSTAB(), CG2(), CGS(), CHEBY(), Symm_BdMatrix< T >::clear(), TBCI::dot(), ediv(), eig(), erfc3(), expm3(), fabssqr(), gaussj(), hyper2geom1(), idx_set1(), TVector< T >::incr(), IR(), log10(), lu_invert(), lu_solve(), nsList< T, S >::move_window(), numa_optimize(), operator*(), operator<<(), operator<=(), cplx< T >::operator<=(), operator>>(), polar(), QMR(), DILU_BdMatrixPreconditioner< T >::solve(), ILU0_BdMatrixPreconditioner< T >::solve(), sum(), svd_solve(), F_BandMatrix< T >::swap(), F_TMatrix< T >::swap(), TBCI::SWAP(), TMatrix< T >::transpose(), transpose(), NoPreconditioner< T, MatrixType >::transSolve(), DiagPreconditioner< T, MatrixType >::transSolve(), WEAK(), Matrix_Sig< T >::~Matrix_Sig(), Preconditioner_Sig< T, BdMatrix< T > >::~Preconditioner_Sig(), and Vector_Sig< T >::~Vector_Sig().
| #define NAMESPACE_TBCI namespace TBCI { |
Definition at line 310 of file basics.h.
Referenced by abs(), fabs(), fabssqr(), gettid(), std::imag(), log10(), norm(), operator<=(), cplx< T >::operator<=(), and TBCI::SWAP().
| #define NULL (0) |
Definition at line 243 of file basics.h.
Referenced by List< T >::alias(), CRMatrix< T >::allocate(), F_BandMatrix< T >::allocate(), CSCMatrix< T >::allocate(), List< T >::app(), List< T >::checklast(), CRMatrix< T >::copy(), F_BandMatrix< T >::copy(), CSCMatrix< T >::copy(), List< T >::delcurr(), List< T >::deltree(), CRMatrix< T >::destroy(), F_BandMatrix< T >::destroy(), CSCMatrix< T >::destroy(), List< T >::detachcurr(), empty_thread(), List< T >::erase(), free_threads(), List< T >::getbynr(), List< T >::getnr(), init_threads(), List< T >::inscurr(), CSCMatrix< T >::insert(), lina_thread(), List< T >::List(), CRMatrix< T >::operator=(), List< T >::operator=(), nsList< T, S >::qsort(), stopwatch_e::seconds(), CRMatrix< T >::set_row(), CRMatrix< T >::setval(), and nsList< T, S >::sortin_r().
| #define PREFETCH_R | ( | addr, | |
| loc | |||
| ) | do {} while (0) |
In case gcc does not yet support __builtin_prefetch(), we have handcoded assembly with gcc for a few architectures.
Some preliminary results:
Definition at line 741 of file basics.h.
Referenced by busy_read(), do_bdmat_vec_dotmult(), do_bdmat_vec_mult_lnw_opt(), do_bdmat_vec_transmult_lnw_opt(), do_mat_tsv_mult(), do_mat_vec_mult(), do_mat_vec_transmult(), do_mat_vec_transmult_exact(), do_old_mat_mat_mult(), dot(), Vector< T >::fabssqr(), HOTDECL(), lu_decomp(), BdMatrix< T >::operator*(), Vector< T >::operator*(), Matrix< T >::operator*(), Vector< T >::sum(), and BdMatrix< T >::transMult().
| #define PREFETCH_W | ( | addr, | |
| loc | |||
| ) | do {} while (0) |
Definition at line 742 of file basics.h.
Referenced by do_mat_vec_transmult(), do_old_mat_mat_mult(), HOTDECL(), lu_decomp(), BdMatrix< T >::operator*(), Matrix< T >::operator*(), par_fill(), and BdMatrix< T >::transMult().
| #define RESTRICT |
Definition at line 89 of file basics.h.
Referenced by do_mat_mat_mult(), do_old_mat_mat_mult(), and TMatrix< T >::set_ptrs().
| #define SQRT | ( | T | ) |
| #define STD__ std:: |
Definition at line 331 of file basics.h.
Referenced by BdMatrix< T >::adddiag(), cplx< T >::atanh(), BiCGSTAB(), CGS(), F_TMatrix< T >::conj(), BdMatrix< T >::constructor(), Symm_BdMatrix< T >::create(), CSCMatrix< T >::do_export(), dot(), eig(), BdMatrix< T >::expand(), expm3(), fabssqr(), Vector< T >::fabssqr(), CSCMatrix< T >::fill(), BdMatrix< T >::free_diags(), gaussj(), Symm_BdMatrix< T >::get(), F_TMatrix< T >::herm(), hyper2geom1(), inv(), F_BandMatrix< T >::ldab(), lu_decomp(), lu_solve(), lu_solve_expert(), CSCMatrix< T >::MatVecMult(), BdMatrix< T >::operator TMatrix< T >(), FS_Vector< dims, T >::operator!=(), CRMatrix< T >::operator!=(), BdMatrix< T >::operator!=(), F_Matrix< T >::operator!=(), Matrix< T >::operator!=(), Symm_BdMatrix< T >::operator*(), operator*(), Vector< T >::operator*(), operator<<(), operator<=(), cplx< T >::operator<=(), BdMatrix< T >::operator=(), Vector< T >::operator==(), BVector< unsigned >::operator>(), operator>>(), QMR(), CTensor< T >::rank_size(), BdMatrix< T >::removediag(), Symm_BdMatrix< T >::setval(), sv_decomp(), F_TMatrix< T >::trans(), ILU0_Symm_BdMatrixPreconditioner< T >::update(), TVector< T >::vec_info(), TSVector< T >::vec_info(), Vector< unsigned >::vec_info(), and Vector< unsigned >::Vector().
| #define TBCI__ TBCI:: |
Definition at line 325 of file basics.h.
Referenced by abs(), acos(), acosh(), arg(), asin(), asinh(), atan(), atanh(), BiCGSTAB(), CGS(), conj(), cos(), cosh(), cplx< T >::exp(), exp(), expm(), fabs(), TSVector< T >::fabssqr(), TSMatrix< T >::fabssqr(), fabssqr(), hyper2geom1(), imag(), TVector< T >::incr(), log(), log10(), norm(), cplx< T >::operator<=(), operator>>(), polar(), pow(), cplx< T >::power(), sin(), sinh(), sqr(), cplx< T >::sqrt(), sqrt(), sum(), TSVector< T >::sum(), F_TMatrix< T >::swap(), tan(), tanh(), cplx< T >::theta(), and TMatrix< T >::transpose().
Definition at line 451 of file basics.h.
Referenced by std::conj(), TBCI::dot(), std::fabs(), std::imag(), std::real(), and TBCI::sign().
| #define TBCICLEAR | ( | n, | |
| t, | |||
| s | |||
| ) | _par_fill < t > (s,n,t(0)) |
Definition at line 892 of file basics.h.
Referenced by TMatrix< T >::clear(), BVector< unsigned >::init_0(), and TMatrix< T >::setunit().
| #define TBCICOMP | ( | n, | |
| o, | |||
| t, | |||
| s | |||
| ) | _par_comp< t > (s, n, o) |
The above discussion similarily holds for comparing things. memcmp() however is much less dangerous. You risk to have two logically identical objects, which still don't have the same bytes to be compared to be unequal. OTOH, our manual memcmp seems to be faster ...
Definition at line 960 of file basics.h.
Referenced by BVector< T >::operator==(), F_TMatrix< T >::operator==(), BdMatrix< T >::operator==(), TMatrix< T >::operator==(), F_TSMatrix< T >::operator==(), TSVector< T >::operator==(), TSMatrix< T >::operator==(), F_Matrix< T >::operator==(), Vector< T >::operator==(), and Matrix< T >::operator==().
| #define TBCICOPY | ( | n, | |
| o, | |||
| t, | |||
| s | |||
| ) | _par_copy < t > (s,n,o) |
Note (KG, 01/06/15): Discussing with Jan I just got the idea that copying of data with memcpy () is a dangerous thing to do. It only works, if the memory of the type T is contiguous (this is believed to be true) and does not have any pointers with dynamically allocated memory. Again, we have a speed vs. general implementation issue. memcpy () is believed to be faster, normally ... Actually, even the assignment can go wrong, if we have a slightly non-std meaning of assignment like the non-resizing of Vectors and Matrices.
Definition at line 875 of file basics.h.
Referenced by BVector< T >::append(), BVector< T >::BVector(), bvfillm(), F_TMatrix< T >::clear(), F_TSMatrix< T >::clone(), TSVector< T >::clone(), TSMatrix< T >::clone(), BVector< T >::concat(), BdMatrix< T >::constructor(), BdMatrix< T >::do_copy(), BdMatrix< T >::expand(), F_TMatrix< T >::F_TMatrix(), TMatrix< T >::fill(), F_TMatrix< T >::get_col(), TMatrix< T >::get_row(), Matrix< T >::operator()(), F_TMatrix< T >::operator=(), BVector< T >::operator=(), TMatrix< T >::operator=(), Vector< unsigned >::operator=(), BdMatrix< T >::reconfig(), BVector< T >::remove(), BVector< T >::resize(), F_TMatrix< T >::resize(), BdMatrix< T >::resize(), TMatrix< T >::resize(), F_TMatrix< T >::set_col(), TMatrix< T >::set_row(), TMatrix< T >::set_row_partial(), TMatrix< T >::size(), Vector< T >::slice(), TMatrix< T >::TMatrix(), and Vector< T >::Vector().
| #define TBCIERRH1 __PRETTY_FUNCTION__ |
| #define TBCIERRM | ( | cond, | |
| exc, | |||
| txt, | |||
| ind | |||
| ) |
| #define TBCIERRS | ( | cond, | |
| exc, | |||
| txt, | |||
| ind | |||
| ) |
| #define TBCIFILL | ( | n, | |
| v, | |||
| t, | |||
| s | |||
| ) | _par_fill < t > (s,n,v) |
Definition at line 891 of file basics.h.
Referenced by BdMatrix< T >::adddiag(), BVector< T >::BVector(), F_TMatrix< T >::clear(), BdMatrix< T >::clear(), F_TMatrix< T >::F_TMatrix(), BVector< T >::fill(), F_TMatrix< T >::fill(), BdMatrix< T >::fill(), TMatrix< T >::fill(), BdMatrix< T >::removediag(), F_TMatrix< T >::resize(), BdMatrix< T >::resize(), TMatrix< T >::resize(), F_TMatrix< T >::setunit(), BdMatrix< T >::setunit(), and TMatrix< T >::TMatrix().
| #define UNLIKELY | ( | expr | ) | (expr) |
Definition at line 101 of file basics.h.
Referenced by cplx< T >::abs(), BdMatrix< T >::adddiag(), tbci_memalloc_cache< T >::alloc(), BdMatrix< T >::BdMatrix(), BiCG(), BiCGSTAB(), BVector< T >::BVector(), BVector< unsigned >::BVector(), BVector< T >::cheapdownsize(), TMatrix< T >::cheapdownsizerow(), TMatrix< T >::clear(), TSVector< T >::clone(), BdMatrix< T >::constructor(), BVector< T >::contains(), tbci_memalloc_cache< T >::dealloc(), TSVector< T >::detach(), do_mat_tsv_mult(), do_mat_vec_mult(), empty_thread(), BdMatrix< T >::expand(), cplx< T >::fabs(), tbci_memalloc_cache< T >::free_and_enter(), BVector< unsigned >::init_0(), CSCMatrix< T >::insert(), lina_thread(), lu_decomp(), lu_solve(), Vector< T >::max(), Vector< T >::min(), operator*(), TSVector< T >::operator+(), TSVector< T >::operator-(), operator<<(), BVector< T >::operator<=(), BdMatrix< T >::operator==(), TMatrix< T >::operator==(), TSVector< T >::operator==(), TSMatrix< T >::operator==(), Vector< T >::operator==(), Matrix< T >::operator==(), BVector< T >::operator>=(), TMatrix< T >::real_destroy(), BVector< T >::remove(), CSCMatrix< T >::resize(), BVector< T >::resize(), TMatrix< T >::resize(), TMatrix< T >::row_expand(), TMatrix< T >::set_ptrs(), TVector< T >::slice(), Vector< T >::slice(), cplx< T >::theta(), ILU0_Symm_BdMatrixPreconditioner< T >::update(), DILU_BdMatrixPreconditioner< T >::update(), Vector< T >::Vector(), BdMatrix< T >::~BdMatrix(), and BVector< T >::~BVector().
1.8.11