|
TBCI Numerical high perf. C++ Library
2.8.0
|
Implementation of classes TBCI::Matrix, TBCI::TMatrix, TBCI::TSMatrix. More...
#include "tbci/basics.h"#include "tbci/vector.h"#include "tbci/matrix_sig.h"#include "matrix_kernels.h"
Go to the source code of this file.
Classes | |
| class | MatErr |
| exception class More... | |
| class | Matrix< T > |
| class | TMatrix< T > |
| class | TSMatrix< T > |
| class | Mat_Brack< T > |
| class | BdMatrix< T > |
| The class BdMatrix is an implementation to store and do operations on sparse Matrices with a band structure. More... | |
| class | Tensor< T > |
| Tensor class including arithmetics. More... | |
| class | TMatrix< T > |
| class | TSMatrix< T > |
| class | Matrix< T > |
| class | Mat_Brack< T > |
| class | mat_fill_fn< T > |
Macros | |
| #define | _VEC vec |
| #define | _ENDVEC endvec |
| #define | _DIM dim |
| #define | _ROW row |
| #define | _COL col |
| #define | _FAC fac |
| #define | SMP_MATSLICE 4096 |
| #define | SMP_MATSLICE2 (SMP_MATSLICE/sizeof(T)) |
| #define | COST_MATMAT_OLD(ra, ca, cb) |
| #define | COST_MATMAT_NEW(ra, ca, cb) |
| #define | COST_MATMAT(ra, ca, cb) COST_MATMAT_NEW(ra,ca,cb) |
| #define | NOFMA |
Enumerations | |
| enum | rowcolvec { rowvec = 0, colvec = 1 } |
Functions | |
| template<typename T > | |
| void | do_mat_vec_mult (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec) |
| template<typename T > | |
| void | do_mat_tsv_mult (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const TSVector< T > *vec) |
| template<typename T > | |
| void | do_mat_vec_transmult (const unsigned start, const unsigned end, TVector< T > *res, const Matrix< T > *mat, const Vector< T > *vec) |
| template<typename T > | |
| TMatrix< T > | operator+ (const T &a, TMatrix< T > b) |
| template<typename T > | |
| TMatrix< T > | operator- (const T &a, TMatrix< T > b) |
| template<typename T > | |
| TSMatrix< T > | operator* (const T &a, TMatrix< T > b) |
| template<typename T > | |
| TMatrix< T > | operator+ (const T &a, const Matrix< T > &b) |
| template<typename T > | |
| TMatrix< T > | operator- (const T &a, const Matrix< T > &b) |
| template<typename T > | |
| TSMatrix< T > | operator* (const T &a, const Matrix< T > &b) |
| template<typename T > | |
| double | fabssqr (const TMatrix< T > &tm) |
| template<typename T > | |
| TMatrix< T > | transpose (const TMatrix< T > &tm) |
| template<typename T > | |
| NAMESPACE_END NAMESPACE_CSTD double | fabs (const TBCI__ TMatrix< T > &tm) |
| template<typename T > | |
| double | fabs (const TBCI__ Matrix< T > &m) |
| template<typename T > | |
| TMatrix< T > | operator+ (const T &a, const TSMatrix< T > &ts) |
| template<typename T > | |
| TMatrix< T > | operator- (const T &a, const TSMatrix< T > &ts) |
| template<typename T > | |
| TSMatrix< T > | operator* (const T &f, TSMatrix< T > ts) |
| template<typename T > | |
| double | fabssqr (TSMatrix< T > &tsm) |
| template<typename T > | |
| NAMESPACE_END NAMESPACE_CSTD double | fabs (TBCI__ TSMatrix< T > &ts) |
| template<typename T > | |
| STD__ ostream & | operator<< (STD__ ostream &os, const Matrix< T > &m) |
| template<typename T > | |
| STD__ istream & | operator>> (STD__ istream &in, Matrix< T > &m) |
| template<typename T > | |
| STD__ ostream & | operator<< (STD__ ostream &os, TMatrix< T > tm) |
| template<typename T > | |
| STD__ ostream & | operator<< (STD__ ostream &os, const TSMatrix< T > &ts) |
| INST (template< typename T > class TMatrix friend void do_mat_mat_mult(const unsigned, const unsigned, TMatrix< T > *, const Matrix< T > *, const Matrix< T > *);) template< typename T > inline void job_mat_mat_mult(struct thr_ctrl *tc) | |
| template<typename T > | |
| double | fabssqr (const Matrix< T > &m) |
| template<typename T > | |
| void | job_mat_vec_mult (struct thr_ctrl *tc) |
| template<typename T > | |
| void | job_mat_vec_transmult (struct thr_ctrl *tc) |
| template<typename T > | |
| BVector< T > & | bvfillm (BVector< T > &bv, const Matrix< T > &m) |
| template<typename T > | |
| int | lu_decomp (Matrix< T > &) HOT |
| LU decomposes the TBCI::Matrix mat. More... | |
| template<typename T > | |
| void | do_fill_mat (const unsigned firstrow, const unsigned lastrow, Matrix< T > *mat, mat_fill_fn< T > fn, void *par) |
| template<typename T > | |
| void | job_fill_mat (struct thr_ctrl *tc) |
| template<typename T > | |
| void | par_fill (Matrix< T > &mat, mat_fill_fn< T > fn, void *par) |
| template<typename T > | |
| int | numa_optimize (const Matrix< T > &m, bool fault_in) |
Implementation of classes TBCI::Matrix, TBCI::TMatrix, TBCI::TSMatrix.
Definition in file matrix.h.
| #define COST_MATMAT | ( | ra, | |
| ca, | |||
| cb | |||
| ) | COST_MATMAT_NEW(ra,ca,cb) |
| #define COST_MATMAT_NEW | ( | ra, | |
| ca, | |||
| cb | |||
| ) |
| #define COST_MATMAT_OLD | ( | ra, | |
| ca, | |||
| cb | |||
| ) |
| #define SMP_MATSLICE2 (SMP_MATSLICE/sizeof(T)) |
Definition at line 99 of file matrix.h.
Referenced by Matrix< T >::operator*(), par_fill(), and Matrix< T >::transMult().
Definition at line 2248 of file matrix.h.
References BCHK, BVector< T >::dim, TMatrix< T >::dim, TMatrix< T >::size(), T, TBCICOPY, BVector< T >::vec, and TMatrix< T >::vec.
Referenced by Matrix< T >::clear(), and BVector< unsigned >::init_0().
| void do_fill_mat | ( | const unsigned | firstrow, |
| const unsigned | lastrow, | ||
| Matrix< T > * | mat, | ||
| mat_fill_fn< T > | fn, | ||
| void * | par | ||
| ) |
Definition at line 2396 of file matrix.h.
References c, TMatrix< T >::columns(), mat_fill_fn< T >::fn, and REGISTER.
| void do_mat_tsv_mult | ( | const unsigned | start, |
| const unsigned | end, | ||
| TVector< T > * | res, | ||
| const Matrix< T > * | mat, | ||
| const TSVector< T > * | vec | ||
| ) |
Referenced by if(), Matrix< T >::operator*(), and TVector< T >::TVector().
| void do_mat_vec_mult | ( | const unsigned | start, |
| const unsigned | end, | ||
| TVector< T > * | res, | ||
| const Matrix< T > * | mat, | ||
| const Vector< T > * | vec | ||
| ) |
Referenced by if(), job_mat_vec_mult(), Matrix< T >::transMult(), and TVector< T >::TVector().
| void do_mat_vec_transmult | ( | const unsigned | start, |
| const unsigned | end, | ||
| TVector< T > * | res, | ||
| const Matrix< T > * | mat, | ||
| const Vector< T > * | vec | ||
| ) |
Referenced by if(), job_mat_vec_transmult(), and TVector< T >::TVector().
|
inline |
Definition at line 1100 of file matrix.h.
References TMatrix< T >::fabs(), INST(), and TBCI__.
Definition at line 1105 of file matrix.h.
References NAMESPACE_CSTD_END, and NAMESPACE_TBCI.
| NAMESPACE_END NAMESPACE_CSTD double fabs | ( | TBCI__ TSMatrix< T > & | ts | ) |
Definition at line 1554 of file matrix.h.
References NAMESPACE_CSTD_END, and NAMESPACE_TBCI.
Definition at line 1054 of file matrix.h.
References TMatrix< T >::fabssqr().
Referenced by TMatrix< T >::fabs(), and TMatrix< T >::resize().
Definition at line 1543 of file matrix.h.
References TMatrix< T >::fabs(), TSMatrix< T >::fabssqr(), INST(), NAMESPACE_CSTD, NAMESPACE_END, and TBCI__.
Definition at line 2113 of file matrix.h.
References Matrix< T >::fabssqr().
| INST | ( | template< typename T > class TMatrix friend void do_mat_mat_mult(const unsigned, const unsigned, TMatrix< T > *, const Matrix< T > *, const Matrix< T > *); | ) |
Definition at line 1950 of file matrix.h.
Referenced by fabs(), fabssqr(), operator*(), operator+(), operator-(), TSMatrix< T >::operator-(), TMatrix< T >::operator/(), operator<<(), TSMatrix< T >::operator==(), operator>>(), TMatrix< T >::transpose(), and TMatrix< T >::transposed_copy().
|
inline |
Definition at line 2408 of file matrix.h.
References thr_ctrl::t_off, thr_ctrl::t_par, and thr_ctrl::t_size.
|
inline |
Definition at line 2134 of file matrix.h.
References do_mat_vec_mult(), thr_ctrl::t_off, thr_ctrl::t_par, and thr_ctrl::t_size.
|
inline |
Definition at line 2142 of file matrix.h.
References do_mat_vec_transmult(), thr_ctrl::t_off, thr_ctrl::t_par, and thr_ctrl::t_size.
LU decomposes the TBCI::Matrix mat.
Decomposition is compactly stored in one Matrix The diagonal elements of the lower Matrix are all 1 (this is a feature of the algorithm).
Definition at line 94 of file lu_solver.h.
References ALIGN2, BCHK, TMatrix< T >::columns(), EL_PER_CL, err, std::fabs(), TMatrix< T >::get(), TMatrix< T >::getcref(), i, INST, LIKELY, LU_fwd_subst(), MATH__, MAX, MIN, MIN_ALIGN2, MLU_MINVAL, PREFETCH_R, REGISTER, TMatrix< T >::rows(), TMatrix< T >::setval(), T, and UNLIKELY.
Referenced by lu_det(), lu_invert(), lu_solve(), and BdMatrix< T >::setoutopts().
Definition at line 1003 of file matrix.h.
References b, INST(), STD_SMP_TEMPLATE2C, and T.
Referenced by TMatrix< T >::TMatrix().
Definition at line 1383 of file matrix.h.
References TSMatrix< T >::detach(), INST(), STD_SMP_TEMPLATE4C, and T.
Definition at line 1010 of file matrix.h.
References b, INST(), STD_SMP_TEMPLATE2C, and T.
Referenced by TMatrix< T >::TMatrix().
Definition at line 1391 of file matrix.h.
References TSMatrix< T >::detach(), STD_SMP_TEMPLATE4C, and T.
Definition at line 1817 of file matrix.h.
References TMatrix< T >::col, i, INST(), TMatrix< T >::row, TMatrix< T >::set_row(), and STD__.
| void par_fill | ( | Matrix< T > & | mat, |
| mat_fill_fn< T > | fn, | ||
| void * | par | ||
| ) |
Definition at line 2417 of file matrix.h.
References TMatrix< T >::columns(), TMatrix< T >::getrowptr(), LIKELY, main_numa_node, TMatrix< T >::mat, numa_avail, numa_node, numa_optimize(), PREFETCH_W, res, TMatrix< T >::rows(), SMP_MATSLICE2, T, job_output::t_res_l, thread_start_off(), thread_wait(), threads, and threads_avail.
Definition at line 1073 of file matrix.h.
References TMatrix< T >::transposed_copy().
Referenced by TMatrix< T >::operator*().
1.8.11