bugfix in Product and ei_L2_block_traits

This commit is contained in:
Gael Guennebaud
2008-08-24 16:00:17 +00:00
parent 440664cd5d
commit bf17467ce0
5 changed files with 23 additions and 13 deletions

View File

@@ -27,7 +27,7 @@
template <int L2MemorySize,typename Scalar>
struct ei_L2_block_traits {
enum {width = ei_meta_sqrt<L2MemorySize/(64*sizeof(Scalar))>::ret };
enum {width = 8 * ei_meta_sqrt<L2MemorySize/(64*sizeof(Scalar))>::ret };
};
#ifndef EIGEN_EXTERN_INSTANTIATIONS

View File

@@ -60,8 +60,7 @@ struct ProductReturnType
typedef typename ei_nested<Lhs,Rhs::ColsAtCompileTime>::type LhsNested;
typedef typename ei_nested<Rhs,Lhs::RowsAtCompileTime>::type RhsNested;
typedef Product<typename ei_unconst<LhsNested>::type,
typename ei_unconst<RhsNested>::type, ProductMode> Type;
typedef Product<LhsNested, RhsNested, ProductMode> Type;
};
// cache friendly specialization
@@ -71,11 +70,10 @@ struct ProductReturnType<Lhs,Rhs,CacheFriendlyProduct>
typedef typename ei_nested<Lhs,Rhs::ColsAtCompileTime>::type LhsNested;
typedef typename ei_nested<Rhs,Lhs::RowsAtCompileTime,
typename ei_product_eval_to_column_major<Rhs>::type
>::type RhsNested;
typename ei_product_eval_to_column_major<Rhs>::type
>::type RhsNested;
typedef Product<typename ei_unconst<LhsNested>::type,
typename ei_unconst<RhsNested>::type, CacheFriendlyProduct> Type;
typedef Product<LhsNested, RhsNested, CacheFriendlyProduct> Type;
};
/* Helper class to determine the type of the product, can be either:

View File

@@ -54,7 +54,11 @@ template<typename T> struct ei_unpointer<T*const> { typedef T type; };
template<typename T> struct ei_unconst { typedef T type; };
template<typename T> struct ei_unconst<const T> { typedef T type; };
// template<typename T> struct ei_unconst<const T&> { typedef T& type; };
template<typename T> struct ei_unconst<T const &> { typedef T & type; };
template<typename T> struct ei_unconst<T const *> { typedef T * type; };
template<typename T> struct ei_unconst<T const volatile> { typedef T volatile type; };
template<typename T> struct ei_unconst<T const volatile &> { typedef T volatile & type; };
template<typename T> struct ei_unconst<T const volatile *> { typedef T volatile * type; };
template<typename T> struct ei_cleantype { typedef T type; };
template<typename T> struct ei_cleantype<const T> { typedef typename ei_cleantype<T>::type type; };