Bugzilla – Attachment 555 Details for
Bug 949
Add static assertion for incompatible scalar types in decompositions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
[patch]
Static assertions on wrong scalar types
bug_949_static_assert_on_scalar_type_for_solvers.diff (text/plain), 3.23 KB, created by
Gael Guennebaud
on 2015-03-09 17:07:57 UTC
(
hide
)
Description:
Static assertions on wrong scalar types
Filename:
MIME Type:
Creator:
Gael Guennebaud
Created:
2015-03-09 17:07:57 UTC
Size:
3.23 KB
patch
obsolete
>diff --git a/test/unalignedassert.cpp b/test/unalignedassert.cpp >--- a/test/unalignedassert.cpp >+++ b/test/unalignedassert.cpp >@@ -76,17 +76,17 @@ void construct_at_boundary(int boundary) > T *x = ::new(reinterpret_cast<void*>(_buf)) T; > x[0].setZero(); // just in order to silence warnings > x->~T(); > } > #endif > > void unalignedassert() > { >- #if EIGEN_ALIGN_STATICALLY >+#if EIGEN_ALIGN_STATICALLY > construct_at_boundary<Vector2f>(4); > construct_at_boundary<Vector3f>(4); > construct_at_boundary<Vector4f>(16); > construct_at_boundary<Matrix2f>(16); > construct_at_boundary<Matrix3f>(4); > construct_at_boundary<Matrix4f>(EIGEN_ALIGN_BYTES); > > construct_at_boundary<Vector2d>(16); >@@ -95,33 +95,34 @@ void unalignedassert() > construct_at_boundary<Matrix2d>(EIGEN_ALIGN_BYTES); > construct_at_boundary<Matrix3d>(4); > construct_at_boundary<Matrix4d>(EIGEN_ALIGN_BYTES); > > construct_at_boundary<Vector2cf>(16); > construct_at_boundary<Vector3cf>(4); > construct_at_boundary<Vector2cd>(EIGEN_ALIGN_BYTES); > construct_at_boundary<Vector3cd>(16); >- #endif >+#endif > > check_unalignedassert_good<TestNew1>(); > check_unalignedassert_good<TestNew2>(); > check_unalignedassert_good<TestNew3>(); > > check_unalignedassert_good<TestNew4>(); > check_unalignedassert_good<TestNew5>(); > check_unalignedassert_good<TestNew6>(); > check_unalignedassert_good<Depends<true> >(); > > #if EIGEN_ALIGN_STATICALLY >- if(EIGEN_ALIGN_BYTES==16) >+ if(EIGEN_ALIGN_BYTES>=16) > { > VERIFY_RAISES_ASSERT(construct_at_boundary<Vector4f>(8)); > VERIFY_RAISES_ASSERT(construct_at_boundary<Vector2d>(8)); > VERIFY_RAISES_ASSERT(construct_at_boundary<Vector2cf>(8)); >+ VERIFY_RAISES_ASSERT(construct_at_boundary<Vector4i>(8)); > } > for(int b=8; b<EIGEN_ALIGN_BYTES; b+=8) > { > VERIFY_RAISES_ASSERT(construct_at_boundary<Vector8f>(b)); > VERIFY_RAISES_ASSERT(construct_at_boundary<Matrix4f>(b)); > VERIFY_RAISES_ASSERT(construct_at_boundary<Vector4d>(b)); > VERIFY_RAISES_ASSERT(construct_at_boundary<Matrix2d>(b)); > VERIFY_RAISES_ASSERT(construct_at_boundary<Matrix4d>(b)); >diff --git a/test/vectorization_logic.cpp b/test/vectorization_logic.cpp >--- a/test/vectorization_logic.cpp >+++ b/test/vectorization_logic.cpp >@@ -209,17 +209,17 @@ template<typename Scalar, bool Enable = > >(InnerVectorizedTraversal,CompleteUnrolling))); > > VERIFY((test_assign< > Map<Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)>, Aligned, InnerStride<3*PacketSize> >, > Matrix<Scalar,EIGEN_PLAIN_ENUM_MAX(2,PacketSize),EIGEN_PLAIN_ENUM_MAX(2,PacketSize)> > >(DefaultTraversal,CompleteUnrolling))); > > VERIFY((test_assign(Matrix11(), Matrix<Scalar,PacketSize,EIGEN_PLAIN_ENUM_MIN(2,PacketSize)>()*Matrix<Scalar,EIGEN_PLAIN_ENUM_MIN(2,PacketSize),PacketSize>(), >- PacketSize>=EIGEN_CACHEFRIENDLY_PRODUCT_THRESHOLD?DefaultTraversal:InnerVectorizedTraversal, CompleteUnrolling))); >+ InnerVectorizedTraversal, CompleteUnrolling))); > #endif > > VERIFY(test_assign(MatrixXX(10,10),MatrixXX(20,20).block(10,10,2,3), > SliceVectorizedTraversal,NoUnrolling)); > > VERIFY(test_redux(VectorX(10), > LinearVectorizedTraversal,NoUnrolling)); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 949
:
537
|
555
|
556