SourceForge Logo Tiny Vector Matrix library using Expression Templates Sourceforge Project Page

tvmet::loop::gemmt< Rows1, Cols1, Cols2 > Class Template Reference

#include <tvmet/loop/Gemmt.h>

List of all members.


Detailed Description

template<std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
class tvmet::loop::gemmt< Rows1, Cols1, Cols2 >

class for for product matrix-transpose(matrix) operations.

using formula

\[ M_1\,M_2^{T} \]

Example:
 template<class T, std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
 inline
 void
 prod(const Matrix<T, Rows1, Cols1>& lhs, const Matrix<T, Rows2, Cols1>& rhs,
  Matrix<T, Rows1, Rows2>& dest)
 {
   for (std::size_t i = 0; i != Rows1; ++i) {
     for (std::size_t j = 0; j != Rows2; ++j) {
       dest(i, j) = tvmet::loop::gemmt<Rows1, Cols1, Cols1>().prod(lhs, rhs, i, j);
     }
   }
 }
Note:
The number of cols of rhs matrix have to be equal to cols of rhs matrix. The result is a (Rows1 x Rows2) matrix.


Public Member Functions

 gemmt ()

Static Public Member Functions

template<class E1, class E2>
static PromoteTraits< typename
E1::value_type, typename E2::value_type
>::value_type 
prod (const E1 &lhs, const E2 &rhs, std::size_t i, std::size_t j)

Private Types

enum  { count = Cols1, N = (count+7)/8 }

Private Member Functions

 gemmt (const gemmt &)
gemmtoperator= (const gemmt &)


Member Enumeration Documentation

template<std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
anonymous enum [private]

Enumerator:
count 
N 


Constructor & Destructor Documentation

template<std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
tvmet::loop::gemmt< Rows1, Cols1, Cols2 >::gemmt ( const gemmt< Rows1, Cols1, Cols2 > &   )  [private]

template<std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
tvmet::loop::gemmt< Rows1, Cols1, Cols2 >::gemmt (  )  [inline]


Member Function Documentation

template<std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
gemmt& tvmet::loop::gemmt< Rows1, Cols1, Cols2 >::operator= ( const gemmt< Rows1, Cols1, Cols2 > &   )  [private]

template<std::size_t Rows1, std::size_t Cols1, std::size_t Cols2>
template<class E1, class E2>
static PromoteTraits< typename E1::value_type, typename E2::value_type >::value_type tvmet::loop::gemmt< Rows1, Cols1, Cols2 >::prod ( const E1 &  lhs,
const E2 &  rhs,
std::size_t  i,
std::size_t  j 
) [inline, static]


Author: