mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 04:35:57 +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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // end explit vectorization
|
} // end explicit vectorization
|
||||||
|
|
||||||
/* process remaining coeffs (or all if there is no explicit vectorization) */
|
/* process remaining coeffs (or all if there is no explicit vectorization) */
|
||||||
for (int j=alignedSize; j<size; j++)
|
for (int j=alignedSize; j<size; j++)
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* \file GenericPacketMath.h
|
* \file GenericPacketMath.h
|
||||||
*
|
*
|
||||||
* Default implementation for types not supported by the vectorization.
|
* 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.
|
* 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 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 coeffSeparator string printed between two coefficients of the same row
|
||||||
* - \b rowSeparator string printed between two rows
|
* - \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 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
|
* - \b matSuffix string printed at the end of the matrix
|
||||||
*
|
*
|
||||||
* Example: \include IOFormat.cpp
|
* 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()
|
* Therefore, if \a other is not needed anymore, it is quite faster to call solveTriangularInPlace()
|
||||||
* instead of solveTriangular().
|
* 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.
|
* 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.:
|
* \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 ProductEvaluationMode { NormalProduct, CacheFriendlyProduct, DiagonalProduct, SparseProduct };
|
||||||
|
|
||||||
enum {
|
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 */
|
* and good size */
|
||||||
InnerVectorization,
|
InnerVectorization,
|
||||||
/** \internal Vectorization path using a single loop plus scalar loops for the
|
/** \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];
|
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>
|
template<typename T>
|
||||||
inline T* ei_aligned_malloc(size_t size)
|
inline T* ei_aligned_malloc(size_t size)
|
||||||
{
|
{
|
||||||
|
@ -322,7 +322,7 @@ inline Quaternion<Scalar>& Quaternion<Scalar>::setFromTwoVectors(const MatrixBas
|
|||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
inline Quaternion<Scalar> Quaternion<Scalar>::inverse() const
|
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();
|
Scalar n2 = this->norm2();
|
||||||
if (n2 > 0)
|
if (n2 > 0)
|
||||||
return Quaternion(conjugate().coeffs() / n2);
|
return Quaternion(conjugate().coeffs() / n2);
|
||||||
|
@ -127,6 +127,13 @@ public:
|
|||||||
inline QMatrix toQMatrix(void) const;
|
inline QMatrix toQMatrix(void) const;
|
||||||
#endif
|
#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 */
|
/** \returns a read-only expression of the transformation matrix */
|
||||||
inline const MatrixType& matrix() const { return m_matrix; }
|
inline const MatrixType& matrix() const { return m_matrix; }
|
||||||
/** \returns a writable expression of the transformation 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 */
|
/* end optimized selfadjoint - vector product */
|
||||||
|
|
||||||
/* Another interesting note: the above rank-2 update is much slower than the following hand written loop.
|
/* 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 ! */
|
* if we remove the specialization of Block for Matrix then it is even worse, much worse ! */
|
||||||
#ifdef EIGEN_NEVER_DEFINED
|
#ifdef EIGEN_NEVER_DEFINED
|
||||||
for (int j1=i+1; j1<n; ++j1)
|
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))
|
matA.coeffRef(i1,j1) -= matA.coeff(i1,i)*ei_conj(hCoeffs.coeff(j1-1))
|
||||||
+ hCoeffs.coeff(i1-1)*ei_conj(matA.coeff(j1,i));
|
+ 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: 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
|
// note: the sequence of the beta values leads to the subdiagonal entries
|
||||||
|
@ -76,7 +76,7 @@ class HashMatrix
|
|||||||
|
|
||||||
public:
|
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); }
|
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)
|
// static void run(const Lhs& lhs, const Rhs& rhs, ResultType& res)
|
||||||
// {
|
// {
|
||||||
// // trivial product as lhs.row/rhs.col dot products
|
// // 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.
|
// by ProductReturnType which transform it to (col col *) by evaluating rhs.
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
// disbale floating point exceptions
|
// disable floating point exceptions
|
||||||
// this leads to more stable bench results
|
// this leads to more stable bench results
|
||||||
{
|
{
|
||||||
int aux;
|
int aux;
|
||||||
|
1
doc/snippets/.krazy
Normal file
1
doc/snippets/.krazy
Normal file
@ -0,0 +1 @@
|
|||||||
|
EXCLUDE copyright,license
|
@ -152,6 +152,7 @@ template<typename Scalar> void geometry(void)
|
|||||||
|
|
||||||
t1.fromPositionOrientationScale(v0, q1, v1);
|
t1.fromPositionOrientationScale(v0, q1, v1);
|
||||||
VERIFY_IS_APPROX(t1.matrix(), t0.matrix());
|
VERIFY_IS_APPROX(t1.matrix(), t0.matrix());
|
||||||
|
VERIFY_IS_APPROX(t1*v1, t0*v1);
|
||||||
|
|
||||||
// 2D transformation
|
// 2D transformation
|
||||||
Transform2 t20, t21;
|
Transform2 t20, t21;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user