bug #1039: Redefining EIGEN_DEFAULT_DENSE_INDEX_TYPE may lead to errors

This commit is contained in:
Christoph Hertzberg 2015-07-13 16:08:25 +02:00
parent b8df8815f4
commit ea87561564

View File

@ -480,7 +480,7 @@ struct dense_assignment_loop<Kernel, SliceVectorizedTraversal, NoUnrolling>
dstAlignment = alignable ? Aligned : int(dstIsAligned)
};
const Scalar *dst_ptr = &kernel.dstEvaluator().coeffRef(0,0);
if((!bool(dstIsAligned)) && (Index(dst_ptr) % sizeof(Scalar))>0)
if((!bool(dstIsAligned)) && (size_t(dst_ptr) % sizeof(Scalar))>0)
{
// the pointer is not aligend-on scalar, so alignment is not possible
return dense_assignment_loop<Kernel,DefaultTraversal,NoUnrolling>::run(kernel);