|
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, TP) |
#define | TVMET_DECLARE_MACRO(NAME, OP) |
#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, TP) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP) |
#define | TVMET_IMPLEMENT_MACRO(NAME, OP) |
Functions | |
tvmet::TVMET_DECLARE_MACRO (add,+) TVMET_DECLARE_MACRO(sub | |
tvmet::TVMET_DECLARE_MACRO (mul,*) namespace element_wise | |
tvmet::TVMET_IMPLEMENT_MACRO (add,+) TVMET_IMPLEMENT_MACRO(sub | |
tvmet::TVMET_IMPLEMENT_MACRO (mul,*) namespace element_wise |
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template<class E1, class E2, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprVector<E1, Sz>, \ XprVector<E2, Sz> \ >, \ Sz \ > \ operator OP (const XprVector<E1, Sz>& lhs, \ const XprVector<E2, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP, | |||
POD | |||
) |
template<class E, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, POD >, \ XprVector<E, Sz>, \ XprLiteral< POD > \ >, \ Sz \ > \ operator OP (const XprVector<E, Sz>& lhs, \ POD rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class E, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME< POD, typename E::value_type >, \ XprLiteral< POD >, \ XprVector< E, Sz> \ >, \ Sz \ > \ operator OP (POD lhs, \ const XprVector<E, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template<class E1, class E2, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprVector<E1, Sz>, \ XprVector<E2, Sz> \ >, \ Sz \ > \ operator OP (const XprVector<E1, Sz>& lhs, \ const XprVector<E2, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP, | |||
TP | |||
) |
template<class E, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, TP >, \ XprVector<E, Sz>, \ XprLiteral< TP > \ >, \ Sz \ > \ operator OP (const XprVector<E, Sz>& lhs, \ TP rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class E, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<TP, typename E::value_type>, \ XprLiteral< TP >, \ XprVector<E, Sz> \ >, \ Sz \ > \ operator OP (TP lhs, \ const XprVector<E, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template<class E, std::size_t Sz, class T> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, std::complex<T> >, \ XprVector<E, Sz>, \ XprLiteral< std::complex<T> > \ >, \ Sz \ > \ operator OP (const XprVector<E, Sz>& lhs, \ const std::complex<T>& rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class E, std::size_t Sz, class T> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME< std::complex<T>, typename E::value_type >, \ XprLiteral< std::complex<T> >, \ XprVector< E, Sz> \ >, \ Sz \ > \ operator OP (const std::complex<T>& lhs, \ const XprVector<E, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template<class E, std::size_t Sz, class T> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, std::complex<T> >, \ XprVector<E, Sz>, \ XprLiteral< std::complex<T> > \ >, \ Sz \ > \ operator OP (const XprVector<E, Sz>& lhs, \ const std::complex<T>& rhs) TVMET_CXX_ALWAYS_INLINE; \ \ template<class E, std::size_t Sz, class T> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<std::complex<T>, typename E::value_type>, \ XprLiteral< std::complex<T> >, \ XprVector<E, Sz> \ >, \ Sz \ > \ operator OP (const std::complex<T>& lhs, \ const XprVector<E, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_DECLARE_MACRO | ( | NAME, | |
OP | |||
) |
template <class E, std::size_t Sz> \ inline \ XprVector< \ XprUnOp< \ Fcnl_##NAME<typename E::value_type>, \ XprVector<E, Sz> \ >, \ Sz \ > \ operator OP (const XprVector<E, Sz>& rhs) TVMET_CXX_ALWAYS_INLINE;
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
template<class E1, class E2, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprVector<E1, Sz>, \ XprVector<E2, Sz> \ >, \ Sz \ > \ operator OP (const XprVector<E1, Sz>& lhs, \ const XprVector<E2, Sz>& rhs) { \ return NAME (lhs, rhs); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
template<class E, std::size_t Sz, class T> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, std::complex<T> >, \ XprVector<E, Sz>, \ XprLiteral< std::complex<T> > \ >, \ Sz \ > \ operator OP (const XprVector<E, Sz>& lhs, \ const std::complex<T>& rhs) { \ return NAME (lhs, rhs); \ } \ \ template<class E, std::size_t Sz, class T> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME< std::complex<T>, typename E::value_type >, \ XprLiteral< std::complex<T> >, \ XprVector< E, Sz> \ >, \ Sz \ > \ operator OP (const std::complex<T>& lhs, \ const XprVector<E, Sz>& rhs) { \ return NAME (lhs, rhs); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
template<class E1, class E2, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprVector<E1, Sz>, \ XprVector<E2, Sz> \ >, \ Sz \ > \ operator OP (const XprVector<E1, Sz>& lhs, \ const XprVector<E2, Sz>& rhs) { \ typedef XprBinOp< \ Fcnl_##NAME<typename E1::value_type, typename E2::value_type>, \ XprVector<E1, Sz>, \ XprVector<E2, Sz> \ > expr_type; \ return XprVector<expr_type, Sz>(expr_type(lhs, rhs)); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP | |||
) |
template <class E, std::size_t Sz> \ inline \ XprVector< \ XprUnOp< \ Fcnl_##NAME<typename E::value_type>, \ XprVector<E, Sz> \ >, \ Sz \ > \ operator OP (const XprVector<E, Sz>& rhs) { \ typedef XprUnOp< \ Fcnl_##NAME<typename E::value_type>, \ XprVector<E, Sz> \ > expr_type; \ return XprVector<expr_type, Sz>(expr_type(rhs)); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP, | |||
POD | |||
) |
template<class E, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME<typename E::value_type, POD >, \ XprVector<E, Sz>, \ XprLiteral< POD > \ >, \ Sz \ > \ operator OP (const XprVector<E, Sz>& lhs, POD rhs) { \ return NAME (lhs, rhs); \ } \ \ template<class E, std::size_t Sz> \ inline \ XprVector< \ XprBinOp< \ Fcnl_##NAME< POD, typename E::value_type >, \ XprLiteral< POD >, \ XprVector< E, Sz> \ >, \ Sz \ > \ operator OP (POD lhs, const XprVector<E, Sz>& rhs) { \ return NAME (lhs, rhs); \ }
#define TVMET_IMPLEMENT_MACRO | ( | NAME, | |
OP, | |||
TP | |||
) |
Author: |