|
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, TSMatrix< T >::size(), T, TBCICOPY, BVector< T >::vec, and TMatrix< T >::vec.
| 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 Matrix< T >::operator*().
| void do_mat_vec_mult | ( | const unsigned | start, |
| const unsigned | end, | ||
| TVector< T > * | res, | ||
| const Matrix< T > * | mat, | ||
| const Vector< T > * | vec | ||
| ) |
Referenced by job_mat_vec_mult().
| void do_mat_vec_transmult | ( | const unsigned | start, |
| const unsigned | end, | ||
| TVector< T > * | res, | ||
| const Matrix< T > * | mat, | ||
| const Vector< T > * | vec | ||
| ) |
Referenced by job_mat_vec_transmult().
|
inline |
| NAMESPACE_END NAMESPACE_CSTD double fabs | ( | TBCI__ TSMatrix< T > & | ts | ) |
Definition at line 1054 of file matrix.h.
References TMatrix< T >::fabssqr().
Definition at line 1543 of file matrix.h.
References TSMatrix< T >::fabssqr().
Definition at line 2113 of file matrix.h.
References Matrix< T >::fabssqr().
|
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, LIKELY, 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(), and lu_solve().
Definition at line 1003 of file matrix.h.
References b, and STD_SMP_TEMPLATE2C.
Definition at line 1026 of file matrix.h.
References c, and STD_SMP_TEMPLATE3VC.
Definition at line 1383 of file matrix.h.
References TSMatrix< T >::detach(), STD_SMP_TEMPLATE4C, and T.
Definition at line 1010 of file matrix.h.
References b, and STD_SMP_TEMPLATE2C.
Definition at line 1034 of file matrix.h.
References c, and STD_SMP_TEMPLATE3VC.
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, TMatrix< T >::row, and TMatrix< T >::set_row().
| void par_fill | ( | Matrix< T > & | mat, |
| mat_fill_fn< T > | fn, | ||
| void * | par | ||
| ) |
Definition at line 2417 of file matrix.h.
References LIKELY, TMatrix< T >::mat, PREFETCH_W, TMatrix< T >::rows(), SMP_MATSLICE2, T, thread_start_off(), thread_wait(), and threads_avail.
1.8.5