cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT > Class Template Reference

Unroll a binary assignment operator on a fixed-size vector. More...

#include <vector_unroller.h>

List of all members.

Classes

struct  Eval< Last, Last, true >
 Evaluate the binary operator at element Last. More...
struct  Eval< N, Last, false >
 Evaluate the binary operator using a loop. More...
struct  Eval< N, Last, true >
 Evaluate the binary operator for the first Len-1 elements. More...

Public Member Functions

void operator() (vector_type &dest, const SrcT &src, cml::dynamic_size_tag)
 Just use a loop to assign to a runtime-sized vector.
void operator() (vector_type &dest, const SrcT &src, cml::fixed_size_tag)
 Unroll assignment to a fixed-sized vector.

Protected Types

typedef ExprTraits< vector_typedest_traits
typedef ExprTraits< SrcT > src_traits
typedef cml::vector< E, AT > vector_type

Private Member Functions

size_t CheckOrResize (vector_type &dest, const SrcT &src, cml::not_resizable_tag)
size_t CheckOrResize (vector_type &dest, const SrcT &src, cml::resizable_tag)


Detailed Description

template<class OpT, typename E, class AT, class SrcT>
class cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >

Unroll a binary assignment operator on a fixed-size vector.

This uses forward iteration to make efficient use of the cache.

See also:
cml::vector

cml::et::OpAssign

Bug:
Need to verify that OpT is actually an assignment operator.

Definition at line 47 of file vector_unroller.h.


Member Typedef Documentation

template<class OpT , typename E , class AT , class SrcT >
typedef ExprTraits<vector_type> cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::dest_traits [protected]

Definition at line 58 of file vector_unroller.h.

template<class OpT , typename E , class AT , class SrcT >
typedef ExprTraits<SrcT> cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::src_traits [protected]

Definition at line 59 of file vector_unroller.h.

template<class OpT , typename E , class AT , class SrcT >
typedef cml::vector<E,AT> cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::vector_type [protected]

Definition at line 52 of file vector_unroller.h.


Member Function Documentation

template<class OpT , typename E , class AT , class SrcT >
size_t cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::CheckOrResize ( vector_type dest,
const SrcT &  src,
cml::not_resizable_tag   
) [inline, private]

Definition at line 147 of file vector_unroller.h.

References cml::et::CheckedSize().

Here is the call graph for this function:

template<class OpT , typename E , class AT , class SrcT >
size_t cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::CheckOrResize ( vector_type dest,
const SrcT &  src,
cml::resizable_tag   
) [inline, private]

Definition at line 131 of file vector_unroller.h.

References cml::et::CheckedSize(), and cml::et::detail::Resize().

Referenced by cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

template<class OpT , typename E , class AT , class SrcT >
void cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::operator() ( vector_type dest,
const SrcT &  src,
cml::dynamic_size_tag   
) [inline]

Just use a loop to assign to a runtime-sized vector.

Definition at line 157 of file vector_unroller.h.

References cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::CheckOrResize().

Here is the call graph for this function:

template<class OpT , typename E , class AT , class SrcT >
void cml::et::detail::VectorAssignmentUnroller< OpT, E, AT, SrcT >::operator() ( vector_type dest,
const SrcT &  src,
cml::fixed_size_tag   
) [inline]

Unroll assignment to a fixed-sized vector.

Definition at line 103 of file vector_unroller.h.

References cml::et::CheckedSize().

Here is the call graph for this function:


The documentation for this class was generated from the following file:

Generated on Sat Jul 18 19:35:39 2009 for CML 1.0 by  doxygen 1.5.9