|
Tiny Vector Matrix library using Expression Templates | Sourceforge Project Page |
Go to the source code of this file.
Namespaces | |
namespace | tvmet |
The namespace for the Tiny Vector Matrix using Expression Templates Libary. | |
namespace | tvmet::element_wise |
Operators inside this namespace does elementwise operations. | |
Defines | |
#define | TVMET_DECLARE_MACRO(NAME, OP) |
#define | TVMET_DECLARE_MACRO(NAME, OP, POD) |
#define | TVMET_DECLARE_MACRO(NAME, OP) |
#define | TVMET_DECLARE_MACRO(NAME, OP) |
#define | TVMET_DECLARE_MACRO(NAME, OP) |
#define | TVMET_DECLARE_MACRO(NAME, OP, TP) |
#define | TVMET_DECLARE_MACRO(NAME, OP) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP, POD) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP, TP) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP) |
Functions | |
tvmet::TVMET_DECLARE_MACRO (add,+) TVMET_DECLARE_MACRO(sub | |
tvmet::element_wise::TVMET_DECLARE_MACRO (mul,*) TVMET_DECLARE_MACRO(div | |
template<class E1 , std::size_t Rows1, std::size_t Cols1, class E2 , std::size_t Cols2> | |
XprMatrix< XprMMProduct < XprMatrix< E1, Rows1, Cols1 > , Rows1, Cols1, XprMatrix< E2, Cols1, Cols2 >, Cols2 >, Rows1, Cols2 > | tvmet::operator* (const XprMatrix< E1, Rows1, Cols1 > &lhs, const XprMatrix< E2, Cols1, Cols2 > &rhs) TVMET_CXX_ALWAYS_INLINE |
Evaluate the product of two XprMatrix. | |
template<class E1 , std::size_t Rows, std::size_t Cols, class E2 > | |
XprVector< XprMVProduct < XprMatrix< E1, Rows, Cols > , Rows, Cols, XprVector< E2, Cols > >, Rows > | tvmet::operator* (const XprMatrix< E1, Rows, Cols > &lhs, const XprVector< E2, Cols > &rhs) TVMET_CXX_ALWAYS_INLINE |
Evaluate the product of XprMatrix and XprVector. | |
tvmet::TVMET_IMPLEMENT_MACRO (add,+) TVMET_IMPLEMENT_MACRO(sub | |
tvmet::element_wise::TVMET_IMPLEMENT_MACRO (mul,*) TVMET_IMPLEMENT_MACRO(div |
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template<class E1, std::size_t Rows1, std::size_t Cols1, \ class E2> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprMatrix<E1, Rows1, Cols1>, \ XprMatrix<E2, Rows1, Cols1> \ >, \ Rows1, Cols1 \ > \ operator OP (const XprMatrix<E1, Rows1, Cols1>& lhs, \ const XprMatrix<E2, Rows1, Cols1>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP, | |||
POD | |||
) |
template<class E, std::size_t Rows, std::size_t Cols> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, POD >, \ XprMatrix<E, Rows, Cols>, \ XprLiteral< POD > \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E, Rows, Cols>& lhs, \ POD rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class E,std::size_t Rows, std::size_t Cols> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<POD, typename E::value_type>, \ XprLiteral< POD >, \ XprMatrix<E, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (POD lhs, \ const XprMatrix<E, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template<class E1, std::size_t Rows, std::size_t Cols, \ class E2> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprMatrix<E1, Rows, Cols>, \ XprMatrix<E2, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E1, Rows, Cols>& lhs, \ const XprMatrix<E2, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template<class E, std::size_t Rows, std::size_t Cols, class T> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, std::complex<T> >, \ XprMatrix<E, Rows, Cols>, \ XprLiteral< std::complex<T> > \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E, Rows, Cols>& lhs, \ const std::complex<T>& rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class E, std::size_t Rows, std::size_t Cols, class T> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<std::complex<T>, typename E::value_type>, \ XprLiteral< std::complex<T> >, \ XprMatrix<E, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (const std::complex<T>& lhs, \ const XprMatrix<E, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template<class E, std::size_t Rows, std::size_t Cols, class T> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, std::complex<T> >, \ XprMatrix<E, Rows, Cols>, \ XprLiteral< std::complex<T> > \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E, Rows, Cols>& lhs, \ const std::complex<T>& rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class E, std::size_t Rows, std::size_t Cols, class T> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<std::complex<T>, typename E::value_type>, \ XprLiteral< std::complex<T> >, \ XprMatrix<E, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (const std::complex<T>& lhs, \ const XprMatrix<E, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP, | |||
TP | |||
) |
template<class E, std::size_t Rows, std::size_t Cols> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, TP >, \ XprMatrix<E, Rows, Cols>, \ XprLiteral< TP > \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E, Rows, Cols>& lhs, \ TP rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class E, std::size_t Rows, std::size_t Cols> \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<TP, typename E::value_type>, \ XprLiteral< TP >, \ XprMatrix<E, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (TP lhs, \ const XprMatrix<E, Rows, Cols>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template <class E, std::size_t Rows, std::size_t Cols> \ XprMatrix< \ XprUnOp< \ Fcnl_##NAME<typename E::value_type>, \ XprMatrix<E, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E, Rows, Cols>& m) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
template<class E1, std::size_t Rows1, std::size_t Cols1, \ class E2> \ inline \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprMatrix<E1, Rows1, Cols1>, \ XprMatrix<E2, Rows1, Cols1> \ >, \ Rows1, Cols1 \ > \ operator OP (const XprMatrix<E1, Rows1, Cols1>& lhs, \ const XprMatrix<E2, Rows1, Cols1>& rhs) { \ return NAME (lhs, rhs); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
template<class E, std::size_t Rows, std::size_t Cols, class T> \ inline \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, std::complex<T> >, \ XprMatrix<E, Rows, Cols>, \ XprLiteral< std::complex<T> > \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E, Rows, Cols>& lhs, \ const std::complex<T>& rhs) { \ return NAME (lhs, rhs); \ } \ \ template<class E, std::size_t Rows, std::size_t Cols, class T> \ inline \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<std::complex<T>, typename E::value_type>, \ XprLiteral< std::complex<T> >, \ XprMatrix<E, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (const std::complex<T>& lhs, \ const XprMatrix<E, Rows, Cols>& rhs) { \ return NAME (lhs, rhs); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
template<class E1, std::size_t Rows, std::size_t Cols, \ class E2> \ inline \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprMatrix<E1, Rows, Cols>, \ XprMatrix<E2, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E1, Rows, Cols>& lhs, \ const XprMatrix<E2, Rows, Cols>& rhs) { \ typedef XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprMatrix<E1, Rows, Cols>, \ XprMatrix<E2, Rows, Cols> \ > expr_type; \ return XprMatrix<expr_type, Rows, Cols>(expr_type(lhs, rhs)); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP, | |||
TP | |||
) |
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
template <class E, std::size_t Rows, std::size_t Cols> \ inline \ XprMatrix< \ XprUnOp< \ Fcnl_##NAME<typename E::value_type>, \ XprMatrix<E, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E, Rows, Cols>& m) { \ typedef XprUnOp< \ Fcnl_##NAME<typename E::value_type>, \ XprMatrix<E, Rows, Cols> \ > expr_type; \ return XprMatrix<expr_type, Rows, Cols>(expr_type(m)); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP, | |||
POD | |||
) |
template<class E, std::size_t Rows, std::size_t Cols> \ inline \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, POD >, \ XprMatrix<E, Rows, Cols>, \ XprLiteral< POD > \ >, \ Rows, Cols \ > \ operator OP (const XprMatrix<E, Rows, Cols>& lhs, POD rhs) { \ return NAME (lhs, rhs); \ } \ \ template<class E,std::size_t Rows, std::size_t Cols> \ inline \ XprMatrix< \ XprBinOp< \ Fcnl_##NAME<POD, typename E::value_type>, \ XprLiteral< POD >, \ XprMatrix<E, Rows, Cols> \ >, \ Rows, Cols \ > \ operator OP (POD lhs, const XprMatrix<E, Rows, Cols>& rhs) { \ return NAME (lhs, rhs); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
Author: |