mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bugfix in Product and ei_L2_block_traits
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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; };
|
||||
|
||||
Reference in New Issue
Block a user