fix #139, exactly the same issue as #138, this time in Assign.h: const Index is not a compile-time constant, must use enum.

This commit is contained in:
Benoit Jacob 2010-06-16 07:37:52 -04:00
parent 404aa963d9
commit d0d62e4437

View File

@ -419,9 +419,9 @@ struct ei_assign_impl<Derived1, Derived2, LinearVectorizedTraversal, CompleteUnr
typedef typename Derived1::Index Index;
EIGEN_STRONG_INLINE static void run(Derived1 &dst, const Derived2 &src)
{
const Index size = Derived1::SizeAtCompileTime;
const Index packetSize = ei_packet_traits<typename Derived1::Scalar>::size;
const Index alignedSize = (size/packetSize)*packetSize;
enum { size = Derived1::SizeAtCompileTime,
packetSize = ei_packet_traits<typename Derived1::Scalar>::size,
alignedSize = (size/packetSize)*packetSize };
ei_assign_innervec_CompleteUnrolling<Derived1, Derived2, 0, alignedSize>::run(dst, src);
ei_assign_DefaultTraversal_CompleteUnrolling<Derived1, Derived2, alignedSize, size>::run(dst, src);