mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-19 08:09:36 +08:00
Bug fix in linspace_op::packetOp(row,col). Fixes bug #232.
Also, add regression test.
This commit is contained in:
parent
42bc1f77be
commit
c6ad2deead
@ -605,7 +605,7 @@ template <typename Scalar, bool RandomAccess> struct linspaced_op
|
|||||||
EIGEN_STRONG_INLINE const Packet packetOp(Index row, Index col) const
|
EIGEN_STRONG_INLINE const Packet packetOp(Index row, Index col) const
|
||||||
{
|
{
|
||||||
eigen_assert(col==0 || row==0);
|
eigen_assert(col==0 || row==0);
|
||||||
return impl(col + row);
|
return impl.packetOp(col + row);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This proxy object handles the actual required temporaries, the different
|
// This proxy object handles the actual required temporaries, the different
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// This file is part of Eigen, a lightweight C++ template library
|
// This file is part of Eigen, a lightweight C++ template library
|
||||||
// for linear algebra.
|
// for linear algebra.
|
||||||
//
|
//
|
||||||
// Copyright (C) 2010 Jitse Niesen <jitse@maths.leeds.ac.uk>
|
// Copyright (C) 2010-2011 Jitse Niesen <jitse@maths.leeds.ac.uk>
|
||||||
//
|
//
|
||||||
// Eigen is free software; you can redistribute it and/or
|
// Eigen is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU Lesser General Public
|
// modify it under the terms of the GNU Lesser General Public
|
||||||
@ -120,10 +120,9 @@ void test_nullary()
|
|||||||
|
|
||||||
for(int i = 0; i < g_repeat; i++) {
|
for(int i = 0; i < g_repeat; i++) {
|
||||||
CALL_SUBTEST_4( testVectorType(VectorXd(internal::random<int>(1,300))) );
|
CALL_SUBTEST_4( testVectorType(VectorXd(internal::random<int>(1,300))) );
|
||||||
CALL_SUBTEST_5( testVectorType(VectorXd(internal::random<int>(1,300))) );
|
CALL_SUBTEST_5( testVectorType(Vector4d()) ); // regression test for bug 232
|
||||||
CALL_SUBTEST_6( testVectorType(Vector3d()) );
|
CALL_SUBTEST_6( testVectorType(Vector3d()) );
|
||||||
CALL_SUBTEST_7( testVectorType(VectorXf(internal::random<int>(1,300))) );
|
CALL_SUBTEST_7( testVectorType(VectorXf(internal::random<int>(1,300))) );
|
||||||
CALL_SUBTEST_8( testVectorType(VectorXf(internal::random<int>(1,300))) );
|
CALL_SUBTEST_8( testVectorType(Vector3f()) );
|
||||||
CALL_SUBTEST_9( testVectorType(Vector3f()) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user