diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-12-03 21:01:55 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2008-12-03 21:01:55 +0000 |
commit | c1e2156d8a45e28a07474c483af7580e055feb70 (patch) | |
tree | 9898a7e039393908fd99b68f13d433ec02567794 /Eigen/src/Core/Dot.h | |
parent | 84cc69f0f3fb0e232435d2318006500f47277e4d (diff) |
* Much better, consistent error msgs when mixing different scalar types:
- in matrix-matrix product, static assert on the two scalar types to be the same.
- Similarly in CwiseBinaryOp. POTENTIALLY CONTROVERSIAL: we don't allow anymore binary
ops to take two different scalar types. The functors that we defined take two args
of the same type anyway; also we still allow the return type to be different.
Again the reason is that different scalar types are incompatible with vectorization.
Better have the user realize explicitly what mixing different numeric types costs him
in terms of performance.
See comment in CwiseBinaryOp constructor.
- This allowed to fix a little mistake in test/regression.cpp, mixing float and double
- Remove redundant semicolon (;) after static asserts
Diffstat (limited to 'Eigen/src/Core/Dot.h')
-rw-r--r-- | Eigen/src/Core/Dot.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index 3032f79ec..e700b76ae 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -263,9 +263,9 @@ MatrixBase<Derived>::dot(const MatrixBase<OtherDerived>& other) const typedef typename ei_unref<Nested>::type _Nested; typedef typename ei_unref<OtherNested>::type _OtherNested; - EIGEN_STATIC_ASSERT_VECTOR_ONLY(_Nested); - EIGEN_STATIC_ASSERT_VECTOR_ONLY(_OtherNested); - EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(_Nested,_OtherNested); + EIGEN_STATIC_ASSERT_VECTOR_ONLY(_Nested) + EIGEN_STATIC_ASSERT_VECTOR_ONLY(_OtherNested) + EIGEN_STATIC_ASSERT_SAME_VECTOR_SIZE(_Nested,_OtherNested) ei_assert(size() == other.size()); return ei_dot_impl<_Nested, _OtherNested>::run(derived(), other.derived()); |