|
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 _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 do_bdmat_vec_dotmult(), do_bdmat_vec_mult_lnw(), do_bdmat_vec_mult_lnw_opt(), do_bdmat_vec_transmult_lnw(), do_bdmat_vec_transmult_lnw_opt(), expi(), F_TSMatrix< T >::fabs(), FS_Vector< dims, T >::max(), Vector< T >::max(), FS_Vector< dims, T >::min(), Vector< T >::min(), BdMatrix< T >::operator*(), F_TSMatrix< T >::operator*(), TSMatrix< T >::operator*(), F_Matrix< T >::operator*(), Matrix< T >::operator*(), cplx< T >::operator*=(), cplx< T >::operator/(), Vector< T >::operator/(), cplx< T >::operator/=(), BdMatrix< T >::operator/=(), operator>>(), FS_Vector< dims, T >::sum(), and TBCI::SWAP().
| #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 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(), 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(), 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=(), 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(), DILU_BdMatrixPreconditioner< T >::solve(), thread_wait(), thread_wait_result(), TMatrix< T >::TMatrix(), and BdMatrix< T >::~BdMatrix().
| #define CPLX__ std:: |
Definition at line 334 of file basics.h.
Referenced by besselh1(), besselh2(), besseli(), besselj(), besselk(), bessely(), cediv(), cemul(), conj(), do_bdmat_vec_dotmult(), dot(), TBCI::dot(), eig(), FS_Vector< dims, T >::fabssqr(), gamma(), hyper2geom1(), HypergeometricM(), HypergeometricU(), imag(), inv(), lu_solve(), real(), TBCI::sign(), and WEAK().
| #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==(), operator>>(), BdMatrix< T >::setval(), slice(), tbci_memalloc_cache< T >::smp_deinit(), 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(), 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 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(), cplx< T >::power(), and cplx< T >::sqrt().
| #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(), 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()(), 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(), cplx< T >::exp(), 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(), operator<(), operator<=(), BdMatrix< T >::operator==(), operator>(), operator>=(), cplx< T >::power(), QMR(), cplx< T >::sqrt(), 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*(), operator+(), operator-(), sv_decomp(), and F_BandMatrix< T >::transposed_copy().
Safe MIN/MAX macros
Definition at line 648 of file basics.h.
Referenced by 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*(), 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*(), cplx< T >::operator*=(), cplx< T >::operator/(), Vector< T >::operator/(), cplx< T >::operator/=(), BdMatrix< T >::operator/=(), operator>>(), FS_Vector< dims, 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(), 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 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_old_mat_mat_mult(), HOTDECL(), 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(), and TMatrix< T >::set_ptrs().
| #define SQRT | ( | T | ) |
| #define STD__ std:: |
Definition at line 331 of file basics.h.
Referenced by BdMatrix< T >::adddiag(), BiCGSTAB(), CGS(), F_TMatrix< T >::conj(), BdMatrix< T >::constructor(), Symm_BdMatrix< T >::create(), dot(), eig(), expm3(), Vector< T >::fabssqr(), CSCMatrix< T >::fill(), BdMatrix< T >::free_diags(), gaussj(), F_TMatrix< T >::herm(), hyper2geom1(), inv(), lu_decomp(), lu_solve(), lu_solve_expert(), CSCMatrix< T >::MatVecMult(), Symm_BdMatrix< T >::operator*(), Vector< T >::operator*(), operator<<(), BdMatrix< T >::operator=(), operator>>(), QMR(), BdMatrix< T >::removediag(), Symm_BdMatrix< T >::setval(), sv_decomp(), F_TMatrix< T >::trans(), and ILU0_Symm_BdMatrixPreconditioner< T >::update().
| #define TBCI__ TBCI:: |
Definition at line 325 of file basics.h.
Referenced by abs(), BiCGSTAB(), CGS(), cplx< T >::exp(), expm(), fabs(), TSVector< T >::fabssqr(), TSMatrix< T >::fabssqr(), hyper2geom1(), polar(), cplx< T >::power(), and cplx< T >::sqrt().
| #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_TSMatrix< T >::clone(), TSVector< T >::clone(), TSMatrix< T >::clone(), BVector< T >::concat(), BdMatrix< T >::do_copy(), 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=(), 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(), 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(), 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(), 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(), and BVector< T >::~BVector().
1.8.6