mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-19 18:40:38 +08:00
spelling + some krazy directives
This commit is contained in:
parent
80be1ea515
commit
7ea821d18e
@ -490,7 +490,7 @@ static EIGEN_DONT_INLINE void ei_cache_friendly_product_colmajor_times_vector(
|
||||
break;
|
||||
}
|
||||
}
|
||||
} // end explit vectorization
|
||||
} // end explicit vectorization
|
||||
|
||||
/* process remaining coeffs (or all if there is no explicit vectorization) */
|
||||
for (int j=alignedSize; j<size; j++)
|
||||
|
@ -30,7 +30,7 @@
|
||||
* \file GenericPacketMath.h
|
||||
*
|
||||
* Default implementation for types not supported by the vectorization.
|
||||
* In practice these functions are provided to make easier the writting
|
||||
* In practice these functions are provided to make easier the writing
|
||||
* of generic vectorized code.
|
||||
*/
|
||||
|
||||
|
@ -36,9 +36,9 @@ enum { Raw, AlignCols };
|
||||
* - \b flags can be either Raw (default) or AlignCols which aligns all the columns
|
||||
* - \b coeffSeparator string printed between two coefficients of the same row
|
||||
* - \b rowSeparator string printed between two rows
|
||||
* - \b rowPrefix string printed at the begining of each row
|
||||
* - \b rowPrefix string printed at the beginning of each row
|
||||
* - \b rowSuffix string printed at the end of each row
|
||||
* - \b matPrefix string printed at the begining of the matrix
|
||||
* - \b matPrefix string printed at the beginning of the matrix
|
||||
* - \b matSuffix string printed at the end of the matrix
|
||||
*
|
||||
* Example: \include IOFormat.cpp
|
||||
|
@ -251,7 +251,7 @@ void MatrixBase<Derived>::solveTriangularInPlace(MatrixBase<OtherDerived>& other
|
||||
* Therefore, if \a other is not needed anymore, it is quite faster to call solveTriangularInPlace()
|
||||
* instead of solveTriangular().
|
||||
*
|
||||
* For users comming from BLAS, this function (and more specifically solveTriangularInPlace()) offer
|
||||
* For users coming from BLAS, this function (and more specifically solveTriangularInPlace()) offer
|
||||
* all the operations supported by the \c *TRSV and \c *TRSM BLAS routines.
|
||||
*
|
||||
* \b Tips: to perform a \em "right-inverse-multiply" you can simply transpose the operation, e.g.:
|
||||
|
@ -181,7 +181,7 @@ enum DirectionType { Vertical, Horizontal };
|
||||
enum ProductEvaluationMode { NormalProduct, CacheFriendlyProduct, DiagonalProduct, SparseProduct };
|
||||
|
||||
enum {
|
||||
/** \internal Equivalent to a slice vectorization for fixed-size matrices having good alignement
|
||||
/** \internal Equivalent to a slice vectorization for fixed-size matrices having good alignment
|
||||
* and good size */
|
||||
InnerVectorization,
|
||||
/** \internal Vectorization path using a single loop plus scalar loops for the
|
||||
|
@ -44,7 +44,7 @@ template <typename T, int Size> struct ei_aligned_array<T,Size,false>
|
||||
T array[Size];
|
||||
};
|
||||
|
||||
/** \internal allocates \a size * sizeof(\a T) bytes with a 16 bytes based alignement */
|
||||
/** \internal allocates \a size * sizeof(\a T) bytes with a 16 bytes based alignment */
|
||||
template<typename T>
|
||||
inline T* ei_aligned_malloc(size_t size)
|
||||
{
|
||||
|
@ -322,7 +322,7 @@ inline Quaternion<Scalar>& Quaternion<Scalar>::setFromTwoVectors(const MatrixBas
|
||||
template <typename Scalar>
|
||||
inline Quaternion<Scalar> Quaternion<Scalar>::inverse() const
|
||||
{
|
||||
// FIXME should this funtion be called multiplicativeInverse and conjugate() be called inverse() or opposite() ??
|
||||
// FIXME should this function be called multiplicativeInverse and conjugate() be called inverse() or opposite() ??
|
||||
Scalar n2 = this->norm2();
|
||||
if (n2 > 0)
|
||||
return Quaternion(conjugate().coeffs() / n2);
|
||||
|
@ -127,6 +127,13 @@ public:
|
||||
inline QMatrix toQMatrix(void) const;
|
||||
#endif
|
||||
|
||||
/** shortcut for m_matrix(row,col);
|
||||
* \sa MatrixBase::operaror(int,int) const */
|
||||
Scalar operator() (int row, int col) const { return m_matrix(row,col); }
|
||||
/** shortcut for m_matrix(row,col);
|
||||
* \sa MatrixBase::operaror(int,int) */
|
||||
Scalar& operator() (int row, int col) { return m_matrix(row,col); }
|
||||
|
||||
/** \returns a read-only expression of the transformation matrix */
|
||||
inline const MatrixType& matrix() const { return m_matrix; }
|
||||
/** \returns a writable expression of the transformation matrix */
|
||||
|
@ -263,7 +263,7 @@ void Tridiagonalization<MatrixType>::_compute(MatrixType& matA, CoeffVectorType&
|
||||
/* end optimized selfadjoint - vector product */
|
||||
|
||||
/* Another interesting note: the above rank-2 update is much slower than the following hand written loop.
|
||||
* After an analyse of the ASM, it seems GCC (4.2) generate poor code because of the Block. Moreover,
|
||||
* After an analyze of the ASM, it seems GCC (4.2) generate poor code because of the Block. Moreover,
|
||||
* if we remove the specialization of Block for Matrix then it is even worse, much worse ! */
|
||||
#ifdef EIGEN_NEVER_DEFINED
|
||||
for (int j1=i+1; j1<n; ++j1)
|
||||
@ -312,7 +312,7 @@ void Tridiagonalization<MatrixType>::_compute(MatrixType& matA, CoeffVectorType&
|
||||
matA.coeffRef(i1,j1) -= matA.coeff(i1,i)*ei_conj(hCoeffs.coeff(j1-1))
|
||||
+ hCoeffs.coeff(i1-1)*ei_conj(matA.coeff(j1,i));
|
||||
}
|
||||
/* end optimized implemenation */
|
||||
/* end optimized implementation */
|
||||
|
||||
// note: at that point matA(i+1,i+1) is the (i+1)-th element of the final diagonal
|
||||
// note: the sequence of the beta values leads to the subdiagonal entries
|
||||
|
@ -76,7 +76,7 @@ class HashMatrix
|
||||
|
||||
public:
|
||||
|
||||
inline void startFill(int /*reserveSize = 1000 --- currenty unused, don't generate a warning*/) {}
|
||||
inline void startFill(int /*reserveSize = 1000 --- currently unused, don't generate a warning*/) {}
|
||||
|
||||
inline Scalar& fill(int row, int col) { return coeffRef(row, col); }
|
||||
|
||||
|
@ -297,11 +297,11 @@ struct ei_sparse_product_selector<Lhs,Rhs,ResultType,RowMajor,RowMajor,ColMajor>
|
||||
// static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
|
||||
// {
|
||||
// // trivial product as lhs.row/rhs.col dot products
|
||||
// // loop over the prefered order of the result
|
||||
// // loop over the preferred order of the result
|
||||
// }
|
||||
// };
|
||||
|
||||
// NOTE the 2 others cases (col row *) must never occurs since they are catched
|
||||
// NOTE the 2 others cases (col row *) must never occurs since they are caught
|
||||
// by ProductReturnType which transform it to (col col *) by evaluating rhs.
|
||||
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// disbale floating point exceptions
|
||||
// disable floating point exceptions
|
||||
// this leads to more stable bench results
|
||||
{
|
||||
int aux;
|
||||
|
@ -11,4 +11,4 @@ int main(int, char *[])
|
||||
Vector4i v4(1, 2, 3, 4);
|
||||
|
||||
std::cout << "m3\n" << m3 << "\nm4:\n" << m4 << "\nv4:\n" << v4 << std::endl;
|
||||
}
|
||||
}
|
||||
|
1
doc/snippets/.krazy
Normal file
1
doc/snippets/.krazy
Normal file
@ -0,0 +1 @@
|
||||
EXCLUDE copyright,license
|
@ -10,4 +10,4 @@ Vector2i v1;
|
||||
v1 << 14, 15;
|
||||
m2 << v1.transpose(), 16,
|
||||
v1, m1.block(1,1,2,2);
|
||||
cout << m2 << endl;
|
||||
cout << m2 << endl;
|
||||
|
@ -1,3 +1,3 @@
|
||||
Matrix3d m = Matrix3d::Random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here is the maximum of each column:" << endl << m.colwise().maxCoeff() << endl;
|
||||
cout << "Here is the maximum of each column:" << endl << m.colwise().maxCoeff() << endl;
|
||||
|
@ -1,3 +1,3 @@
|
||||
Matrix3d m = Matrix3d::Random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here is the minimum of each column:" << endl << m.colwise().minCoeff() << endl;
|
||||
cout << "Here is the minimum of each column:" << endl << m.colwise().minCoeff() << endl;
|
||||
|
@ -1,3 +1,3 @@
|
||||
Matrix3d m = Matrix3d::Random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here is the norm of each column:" << endl << m.colwise().norm() << endl;
|
||||
cout << "Here is the norm of each column:" << endl << m.colwise().norm() << endl;
|
||||
|
@ -1,3 +1,3 @@
|
||||
Matrix3d m = Matrix3d::Random();
|
||||
cout << "Here is the matrix m:" << endl << m << endl;
|
||||
cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl;
|
||||
cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl;
|
||||
|
@ -2,4 +2,4 @@ Matrix3f m;
|
||||
m << 1, 2, 3,
|
||||
4, 5, 6,
|
||||
7, 8, 9;
|
||||
cout << m;
|
||||
cout << m;
|
||||
|
@ -4,4 +4,4 @@ m << (Matrix3f() << 1, 2, 3, 4, 5, 6, 7, 8, 9).finished(),
|
||||
MatrixXf::Zero(3,cols-3),
|
||||
MatrixXf::Zero(rows-3,3),
|
||||
MatrixXf::Identity(rows-3,cols-3);
|
||||
cout << m;
|
||||
cout << m;
|
||||
|
@ -59,4 +59,4 @@ int main(int argc, char *argv[])
|
||||
m4 = m4 * m4.transpose().eval(); // forces immediate evaluation of the transpose
|
||||
|
||||
std::cout << "*** Step 8 ***\nm3:\n" << m3 << "\nm4:\n" << m4 << std::endl;
|
||||
}
|
||||
}
|
||||
|
@ -152,6 +152,7 @@ template<typename Scalar> void geometry(void)
|
||||
|
||||
t1.fromPositionOrientationScale(v0, q1, v1);
|
||||
VERIFY_IS_APPROX(t1.matrix(), t0.matrix());
|
||||
VERIFY_IS_APPROX(t1*v1, t0*v1);
|
||||
|
||||
// 2D transformation
|
||||
Transform2 t20, t21;
|
||||
|
Loading…
x
Reference in New Issue
Block a user