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

Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions
tvmet::loop::gemv< Rows, Cols > Class Template Reference

class for matrix-vector product using loop unrolling. More...

#include <tvmet/loop/Gemv.h>

List of all members.

Public Member Functions

 gemv ()

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)

Private Types

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

Private Member Functions

 gemv (const gemv &)
gemvoperator= (const gemv &)

Detailed Description

template<std::size_t Rows, std::size_t Cols>
class tvmet::loop::gemv< Rows, Cols >

class for matrix-vector product using loop unrolling.

using formula

\[ M\,v \]

Example:
 template<class T, std::size_t Rows, std::size_t Cols>
 inline
 void
 prod(const Matrix<T, Rows, Cols>& lhs, const Vector<T, Cols>& rhs,
  Vector<T, Rows>& dest)
 {
   for (std::size_t i = 0; i != Rows; ++i) {
     dest(i) = tvmet::loop::gemv<Rows, Cols>().prod(lhs, rhs, i);
   }
 }

Member Enumeration Documentation

template<std::size_t Rows, std::size_t Cols>
anonymous enum [private]
Enumerator:
count 
N 

Constructor & Destructor Documentation

template<std::size_t Rows, std::size_t Cols>
tvmet::loop::gemv< Rows, Cols >::gemv ( const gemv< Rows, Cols > &  ) [private]
template<std::size_t Rows, std::size_t Cols>
tvmet::loop::gemv< Rows, Cols >::gemv ( ) [inline]

Member Function Documentation

template<std::size_t Rows, std::size_t Cols>
gemv& tvmet::loop::gemv< Rows, Cols >::operator= ( const gemv< Rows, Cols > &  ) [private]
template<std::size_t Rows, std::size_t Cols>
template<class E1 , class E2 >
static PromoteTraits< typename E1::value_type, typename E2::value_type >::value_type tvmet::loop::gemv< Rows, Cols >::prod ( const E1 &  lhs,
const E2 &  rhs,
std::size_t  i 
) [inline, static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Defines

Author: