mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* vectorize dot product, copying code from sum.
* make the conj functor vectorizable: it is just identity in real case, and complex doesn't use the vectorized path anyway. * fix bug in Block: a 3x1 block in a 4x4 matrix (all fixed-size) should not be vectorizable, since in fixed-size we are assuming the size to be a multiple of packet size. (Or would you prefer Vector3d to be flagged "packetaccess" even though no packet access is possible on vectors of that type?) * rename: isOrtho for vectors ---> isOrthogonal isOrtho for matrices ---> isUnitary * add normalize() * reimplement normalized with quotient1 functor
This commit is contained in:
@@ -59,7 +59,12 @@ template<typename MatrixType> void cwiseops(const MatrixType& m)
|
||||
|
||||
VERIFY_IS_APPROX( mzero, m1-m1);
|
||||
VERIFY_IS_APPROX( m2, m1+m2-m1);
|
||||
VERIFY_IS_APPROX( mones, m2.cwiseQuotient(m2));
|
||||
#ifdef EIGEN_VECTORIZE
|
||||
if(NumTraits<Scalar>::HasFloatingPoint)
|
||||
#endif
|
||||
{
|
||||
VERIFY_IS_APPROX( mones, m2.cwiseQuotient(m2));
|
||||
}
|
||||
VERIFY_IS_APPROX( m1.cwiseProduct(m2), m2.cwiseProduct(m1));
|
||||
|
||||
VERIFY( m1.cwiseLessThan(m1.cwise(bind2nd(plus<Scalar>(), Scalar(1)))).all() );
|
||||
|
||||
Reference in New Issue
Block a user