aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/CwiseUnaryView.h
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-06-11 07:56:50 -0400
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2010-06-11 07:56:50 -0400
commitbdd7c6c88a0b8cb931480e04e33a17aa08022e06 (patch)
treeecc28fd133ddabfccd76a925043e35003ada6e10 /Eigen/src/Core/CwiseUnaryView.h
parent52e8c42a005cb607ba87e4f028e143d6d91f5021 (diff)
change the value of Dynamic to -1, since the index type is now configurable.
remove EIGEN_ENUM_MIN/MAX, implement new macros instead
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryView.h')
-rw-r--r--Eigen/src/Core/CwiseUnaryView.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Eigen/src/Core/CwiseUnaryView.h b/Eigen/src/Core/CwiseUnaryView.h
index 11a23c66a..953fc89a6 100644
--- a/Eigen/src/Core/CwiseUnaryView.h
+++ b/Eigen/src/Core/CwiseUnaryView.h
@@ -50,9 +50,12 @@ struct ei_traits<CwiseUnaryView<ViewOp, MatrixType> >
Flags = (ei_traits<_MatrixTypeNested>::Flags & (HereditaryBits | LinearAccessBit | DirectAccessBit)),
CoeffReadCost = ei_traits<_MatrixTypeNested>::CoeffReadCost + ei_functor_traits<ViewOp>::Cost,
MatrixTypeInnerStride = ei_inner_stride_at_compile_time<MatrixType>::ret,
+ // need to cast the sizeof's from size_t to int explicitly, otherwise:
+ // "error: no integral type can represent all of the enumerator values
InnerStrideAtCompileTime = MatrixTypeInnerStride == Dynamic
- ? Dynamic
- : MatrixTypeInnerStride * sizeof(typename ei_traits<MatrixType>::Scalar) / sizeof(Scalar),
+ ? int(Dynamic)
+ : int(MatrixTypeInnerStride)
+ * int(sizeof(typename ei_traits<MatrixType>::Scalar) / sizeof(Scalar)),
OuterStrideAtCompileTime = ei_outer_stride_at_compile_time<MatrixType>::ret
};
};