From e6accc73ffd98aca823785625b8938703c2bdf60 Mon Sep 17 00:00:00 2001 From: Rasmus Munk Larsen <4643818-rmlarsen1@users.noreply.gitlab.com> Date: Sat, 21 Feb 2026 14:36:21 -0800 Subject: [PATCH] Fix comment typos, doubled words, grammar errors, and copy-paste mistakes libeigen/eigen!2173 Closes #3034 Co-authored-by: Rasmus Munk Larsen --- Eigen/src/Core/Array.h | 2 +- Eigen/src/Core/ArrayWrapper.h | 4 ++-- Eigen/src/Core/DiagonalMatrix.h | 2 +- Eigen/src/Core/Dot.h | 4 ++-- Eigen/src/Core/GenericPacketMath.h | 6 +++--- Eigen/src/Core/Matrix.h | 2 +- Eigen/src/Core/PlainObjectBase.h | 2 +- Eigen/src/Core/SkewSymmetricMatrix3.h | 2 +- .../src/Core/arch/Default/GenericPacketMathFunctions.h | 4 ++-- Eigen/src/Core/util/Macros.h | 2 +- Eigen/src/Eigenvalues/ComplexQZ.h | 4 ++-- Eigen/src/Geometry/OrthoMethods.h | 6 +++--- Eigen/src/Geometry/Rotation2D.h | 4 ++-- Eigen/src/Geometry/Transform.h | 2 +- Eigen/src/Jacobi/Jacobi.h | 2 +- Eigen/src/KLUSupport/KLUSupport.h | 6 +++--- Eigen/src/MetisSupport/MetisSupport.h | 2 +- Eigen/src/OrderingMethods/Eigen_Colamd.h | 2 +- Eigen/src/PardisoSupport/PardisoSupport.h | 2 +- Eigen/src/SVD/BDCSVD.h | 2 +- Eigen/src/SVD/UpperBidiagonalization.h | 4 ++-- Eigen/src/SparseCholesky/SimplicialCholesky.h | 10 +++++----- Eigen/src/SparseLU/SparseLU.h | 4 ++-- Eigen/src/SuperLUSupport/SuperLUSupport.h | 4 ++-- Eigen/src/ThreadPool/ThreadLocal.h | 2 +- Eigen/src/UmfPackSupport/UmfPackSupport.h | 2 +- Eigen/src/plugins/BlockMethods.inc | 4 ++-- unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h | 4 ++-- 28 files changed, 48 insertions(+), 48 deletions(-) diff --git a/Eigen/src/Core/Array.h b/Eigen/src/Core/Array.h index dd6ea3273..8f4f3453e 100644 --- a/Eigen/src/Core/Array.h +++ b/Eigen/src/Core/Array.h @@ -141,7 +141,7 @@ class Array : public PlainObjectBase > { * \brief Expression of an array as a mathematical vector or matrix * * This class is the return type of ArrayBase::matrix(), and most of the time - * this is the only way it is use. + * this is the only way it is used. * * \sa MatrixBase::matrix(), class ArrayWrapper */ diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index 3b099ff52..c49702009 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -61,7 +61,7 @@ class DiagonalBase : public EigenBase { /** * Constructs a dense matrix from \c *this. Note, this directly returns a dense matrix type, * not an expression. - * \returns A dense matrix, with its diagonal entries set from the the derived object. */ + * \returns A dense matrix, with its diagonal entries set from the derived object. */ EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix() const { return derived(); } /** \returns a reference to the derived object's vector of diagonal coefficients. */ diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index a173306b4..b9abf958f 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -54,7 +54,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE /** \returns, for vectors, the squared \em l2 norm of \c *this, and for matrices the squared Frobenius norm. * In both cases, it consists in the sum of the square of all the matrix entries. - * For vectors, this is also equals to the dot product of \c *this with itself. + * For vectors, this is also equal to the dot product of \c *this with itself. * * \sa dot(), norm(), lpNorm() */ @@ -66,7 +66,7 @@ MatrixBase::squaredNorm() const { /** \returns, for vectors, the \em l2 norm of \c *this, and for matrices the Frobenius norm. * In both cases, it consists in the square root of the sum of the square of all the matrix entries. - * For vectors, this is also equals to the square root of the dot product of \c *this with itself. + * For vectors, this is also equal to the square root of the dot product of \c *this with itself. * * \sa lpNorm(), dot(), squaredNorm() */ diff --git a/Eigen/src/Core/GenericPacketMath.h b/Eigen/src/Core/GenericPacketMath.h index dc3e03d21..7d605d841 100644 --- a/Eigen/src/Core/GenericPacketMath.h +++ b/Eigen/src/Core/GenericPacketMath.h @@ -610,7 +610,7 @@ EIGEN_DEVICE_FUNC inline bool pselect(const bool& cond, const bool& a, con return cond ? a : b; } -/** \internal \returns the min or of \a a and \a b (coeff-wise) +/** \internal \returns the min or max of \a a and \a b (coeff-wise) If either \a a or \a b are NaN, the result is implementation defined. */ template struct pminmax_impl { @@ -648,7 +648,7 @@ struct pminmax_impl { #define EIGEN_BINARY_OP_NAN_PROPAGATION(Type, Func) [](const Type& aa, const Type& bb) { return Func(aa, bb); } /** \internal \returns the min of \a a and \a b (coeff-wise). - If \a a or \b b is NaN, the return value is implementation defined. */ + If \a a or \a b is NaN, the return value is implementation defined. */ template EIGEN_DEVICE_FUNC inline Packet pmin(const Packet& a, const Packet& b) { return numext::mini(a, b); @@ -663,7 +663,7 @@ EIGEN_DEVICE_FUNC inline Packet pmin(const Packet& a, const Packet& b) { } /** \internal \returns the max of \a a and \a b (coeff-wise) - If \a a or \b b is NaN, the return value is implementation defined. */ + If \a a or \a b is NaN, the return value is implementation defined. */ template EIGEN_DEVICE_FUNC inline Packet pmax(const Packet& a, const Packet& b) { return numext::maxi(a, b); diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 01ca9db45..845b07f58 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -271,7 +271,7 @@ class Matrix : public PlainObjectBase::type { * This constructor is for 1D array or vectors with more than 4 coefficients. * * \warning To construct a column (resp. row) vector of fixed length, the number of values passed to this - * constructor must match the the fixed number of rows (resp. columns) of \c *this. + * constructor must match the fixed number of rows (resp. columns) of \c *this. */ template EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE PlainObjectBase(const Scalar& a0, const Scalar& a1, const Scalar& a2, diff --git a/Eigen/src/Core/SkewSymmetricMatrix3.h b/Eigen/src/Core/SkewSymmetricMatrix3.h index 3545afc76..a2bd9c47c 100644 --- a/Eigen/src/Core/SkewSymmetricMatrix3.h +++ b/Eigen/src/Core/SkewSymmetricMatrix3.h @@ -62,7 +62,7 @@ class SkewSymmetricBase : public EigenBase { /** * Constructs a dense matrix from \c *this. Note, this directly returns a dense matrix type, * not an expression. - * \returns A dense matrix, with its entries set from the the derived object. */ + * \returns A dense matrix, with its entries set from the derived object. */ EIGEN_DEVICE_FUNC DenseMatrixType toDenseMatrix() const { return derived(); } /** Determinant vanishes */ diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index 8a24de330..546795890 100644 --- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -1753,7 +1753,7 @@ EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psqrt_complex(const P const RealPacket cst_imag_sign_mask = pset1(Scalar(RealScalar(0.0), RealScalar(-0.0))).v; RealPacket imag_signs = pand(a.v, cst_imag_sign_mask); Packet negative_real_result; - // Notice that rho is positive, so taking it's absolute value is a noop. + // Notice that rho is positive, so taking its absolute value is a noop. negative_real_result.v = por(pabs(pcplxflip(positive_real_result).v), imag_signs); // Step 5. Select solution branch based on the sign of the real parts. @@ -1877,7 +1877,7 @@ struct psign_impl::value && } }; -// \internal \returns the the sign of a complex number z, defined as z / abs(z). +// \internal \returns the sign of a complex number z, defined as z / abs(z). template struct psign_impl::value && NumTraits::type>::IsComplex && diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index a2701035d..7aa369d90 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -595,7 +595,7 @@ // without an explicit launch_bounds attribute is called with a threads_per_block value // greater than 256. // -// This is a regression in functioanlity and is expected to be fixed within the next +// This is a regression in functionality and is expected to be fixed within the next // couple of ROCm releases (compiler will go back to using 1024 value as the default) // // In the meantime, we will use a "only enabled for HIP" macro to set the launch_bounds diff --git a/Eigen/src/Eigenvalues/ComplexQZ.h b/Eigen/src/Eigenvalues/ComplexQZ.h index ed32ea3da..da7da6c9d 100644 --- a/Eigen/src/Eigenvalues/ComplexQZ.h +++ b/Eigen/src/Eigenvalues/ComplexQZ.h @@ -203,7 +203,7 @@ class ComplexQZ { inline Mat2 computeZk2(const Row2& b); - // This is basically taken from from Eigen3::RealQZ + // This is basically taken from Eigen3::RealQZ void hessenbergTriangular(const MatrixType& A, const MatrixType& B); // This function can be called when m_Q and m_Z are initialized and m_S, m_T @@ -243,7 +243,7 @@ void ComplexQZ::compute(const MatrixType& A, const MatrixType& B, b reduceHessenbergTriangular(); } -// This is basically taken from from Eigen3::RealQZ +// This is basically taken from Eigen3::RealQZ template void ComplexQZ::hessenbergTriangular(const MatrixType& A, const MatrixType& B) { // Copy A and B, these will be the matrices on which we operate later diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h index fc708ee22..758c82e0d 100644 --- a/Eigen/src/Geometry/OrthoMethods.h +++ b/Eigen/src/Geometry/OrthoMethods.h @@ -200,7 +200,7 @@ struct unitOrthogonal_selector { EIGEN_DEVICE_FUNC static inline VectorType run(const Derived& src) { VectorType perp; /* Let us compute the crossed product of *this with a vector - * that is not too close to being colinear to *this. + * that is not too close to being collinear to *this. */ /* unless the x and y coords are both close to zero, we can @@ -213,7 +213,7 @@ struct unitOrthogonal_selector { perp.coeffRef(2) = 0; } /* if both x and y are close to zero, then the vector is close - * to the z-axis, so it's far from colinear to the x-axis for instance. + * to the z-axis, so it's far from collinear to the x-axis for instance. * So we take the crossed product with (1,0,0) and normalize it. */ else { @@ -242,7 +242,7 @@ struct unitOrthogonal_selector { * \returns a unit vector which is orthogonal to \c *this * * The size of \c *this must be at least 2. If the size is exactly 2, - * then the returned vector is a counter clock wise rotation of \c *this, i.e., (-y,x).normalized(). + * then the returned vector is a counter-clockwise rotation of \c *this, i.e., (-y,x).normalized(). * * \sa cross() */ diff --git a/Eigen/src/Geometry/Rotation2D.h b/Eigen/src/Geometry/Rotation2D.h index 59180253a..515bd270e 100644 --- a/Eigen/src/Geometry/Rotation2D.h +++ b/Eigen/src/Geometry/Rotation2D.h @@ -23,7 +23,7 @@ namespace Eigen { * * \tparam Scalar_ the scalar type, i.e., the type of the coefficients * - * This class is equivalent to a single scalar representing a counter clock wise rotation + * This class is equivalent to a single scalar representing a counter-clockwise rotation * as a single angle in radian. It provides some additional features such as the automatic * conversion from/to a 2x2 rotation matrix. Moreover this class aims to provide a similar * interface to Quaternion in order to facilitate the writing of generic algorithms @@ -57,7 +57,7 @@ class Rotation2D : public RotationBase, 2> { Scalar m_angle; public: - /** Construct a 2D counter clock wise rotation from the angle \a a in radian. */ + /** Construct a 2D counter-clockwise rotation from the angle \a a in radian. */ EIGEN_DEVICE_FUNC explicit inline Rotation2D(const Scalar& a) : m_angle(a) {} /** Default constructor without initialization. The represented rotation is undefined. */ diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index bb8ba4c7a..88b6b3017 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -745,7 +745,7 @@ Transform& Transform::op /** \returns a QMatrix from \c *this assuming the dimension is 2. * - * \warning this conversion might loss data if \c *this is not affine + * \warning this conversion might lose data if \c *this is not affine * * This function is available only if the token EIGEN_QT_SUPPORT is defined. */ diff --git a/Eigen/src/Jacobi/Jacobi.h b/Eigen/src/Jacobi/Jacobi.h index 457691c13..f24a851f3 100644 --- a/Eigen/src/Jacobi/Jacobi.h +++ b/Eigen/src/Jacobi/Jacobi.h @@ -239,7 +239,7 @@ EIGEN_DEVICE_FUNC void JacobiRotation::makeGivens(const Scalar& p, const namespace internal { /** \jacobi_module - * Applies the clock wise 2D rotation \a j to the set of 2D vectors of coordinates \a x and \a y: + * Applies the clockwise 2D rotation \a j to the set of 2D vectors of coordinates \a x and \a y: * \f$ \left ( \begin{array}{cc} x \\ y \end{array} \right ) = J \left ( \begin{array}{cc} x \\ y \end{array} \right ) * \f$ * diff --git a/Eigen/src/KLUSupport/KLUSupport.h b/Eigen/src/KLUSupport/KLUSupport.h index 69ca8a87e..f07ad8d12 100644 --- a/Eigen/src/KLUSupport/KLUSupport.h +++ b/Eigen/src/KLUSupport/KLUSupport.h @@ -112,7 +112,7 @@ class KLU : public SparseSolverBase > { eigen_assert(m_isInitialized && "Decomposition is not initialized."); return m_info; } - /** Computes the sparse Cholesky decomposition of \a matrix + /** Computes the sparse LU factorization of \a matrix * Note that the matrix should be column-major, and in compressed format for best performance. * \sa SparseMatrix::makeCompressed(). */ @@ -147,7 +147,7 @@ class KLU : public SparseSolverBase > { */ inline const klu_common &kluCommon() const { return m_common; } - /** Provides access to the control settings array used by UmfPack. + /** Provides access to the control settings array used by KLU. * * If this array contains NaN's, the default values are used. * @@ -157,7 +157,7 @@ class KLU : public SparseSolverBase > { /** Performs a numeric decomposition of \a matrix * - * The given matrix must have the same sparsity than the matrix on which the pattern anylysis has been performed. + * The given matrix must have the same sparsity as the matrix on which the pattern analysis has been performed. * * \sa analyzePattern(), compute() */ diff --git a/Eigen/src/MetisSupport/MetisSupport.h b/Eigen/src/MetisSupport/MetisSupport.h index 6c7bf9465..961c84089 100644 --- a/Eigen/src/MetisSupport/MetisSupport.h +++ b/Eigen/src/MetisSupport/MetisSupport.h @@ -38,7 +38,7 @@ class MetisOrdering { IndexVector visited(m); visited.setConstant(-1); for (StorageIndex j = 0; j < m; j++) { - // Compute the union structure of of A(j,:) and At(j,:) + // Compute the union structure of A(j,:) and At(j,:) visited(j) = j; // Do not include the diagonal element // Get the nonzeros in row/column j of A for (typename MatrixType::InnerIterator it(A, j); it; ++it) { diff --git a/Eigen/src/OrderingMethods/Eigen_Colamd.h b/Eigen/src/OrderingMethods/Eigen_Colamd.h index f1ea2ee5b..02be2828e 100644 --- a/Eigen/src/OrderingMethods/Eigen_Colamd.h +++ b/Eigen/src/OrderingMethods/Eigen_Colamd.h @@ -713,7 +713,7 @@ static void init_scoring( for (c = n_col - 1; c >= 0; c--) { deg = Col[c].length; if (deg == 0) { - /* this is a empty column, kill and order it last */ + /* this is an empty column, kill and order it last */ Col[c].shared2.order = --n_col2; Col[c].kill_principal(); } diff --git a/Eigen/src/PardisoSupport/PardisoSupport.h b/Eigen/src/PardisoSupport/PardisoSupport.h index 2f5d83eeb..7091eb7fd 100644 --- a/Eigen/src/PardisoSupport/PardisoSupport.h +++ b/Eigen/src/PardisoSupport/PardisoSupport.h @@ -157,7 +157,7 @@ class PardisoImpl : public SparseSolverBase { /** Performs a numeric decomposition of \a matrix * - * The given matrix must have the same sparsity than the matrix on which the symbolic decomposition has been + * The given matrix must have the same sparsity as the matrix on which the symbolic decomposition has been * performed. * * \sa analyzePattern() diff --git a/Eigen/src/SVD/BDCSVD.h b/Eigen/src/SVD/BDCSVD.h index db1e4a264..817c1e46c 100644 --- a/Eigen/src/SVD/BDCSVD.h +++ b/Eigen/src/SVD/BDCSVD.h @@ -453,7 +453,7 @@ void BDCSVD::copyUV(const HouseholderU& householderU, const * A = [A1] * [A2] * such that A1.rows()==n1, then we assume that at least half of the columns of A1 and A2 are zeros. - * We can thus pack them prior to the the matrix product. However, this is only worth the effort if the matrix is large + * We can thus pack them prior to the matrix product. However, this is only worth the effort if the matrix is large * enough. */ template diff --git a/Eigen/src/SVD/UpperBidiagonalization.h b/Eigen/src/SVD/UpperBidiagonalization.h index 33f32e6f7..76bd1b2e0 100644 --- a/Eigen/src/SVD/UpperBidiagonalization.h +++ b/Eigen/src/SVD/UpperBidiagonalization.h @@ -330,7 +330,7 @@ UpperBidiagonalization& UpperBidiagonalization::comput Index cols = matrix.cols(); EIGEN_ONLY_USED_FOR_DEBUG(cols); - eigen_assert(rows >= cols && "UpperBidiagonalization is only for Arices satisfying rows>=cols."); + eigen_assert(rows >= cols && "UpperBidiagonalization is only for matrices satisfying rows>=cols."); m_householder = matrix; @@ -350,7 +350,7 @@ UpperBidiagonalization& UpperBidiagonalization::comput EIGEN_ONLY_USED_FOR_DEBUG(rows); EIGEN_ONLY_USED_FOR_DEBUG(cols); - eigen_assert(rows >= cols && "UpperBidiagonalization is only for Arices satisfying rows>=cols."); + eigen_assert(rows >= cols && "UpperBidiagonalization is only for matrices satisfying rows>=cols."); m_householder = matrix; upperbidiagonalization_inplace_blocked(m_householder, m_bidiagonal); diff --git a/Eigen/src/SparseCholesky/SimplicialCholesky.h b/Eigen/src/SparseCholesky/SimplicialCholesky.h index 14147945a..997bc2205 100644 --- a/Eigen/src/SparseCholesky/SimplicialCholesky.h +++ b/Eigen/src/SparseCholesky/SimplicialCholesky.h @@ -416,7 +416,7 @@ class SimplicialLLT : public SimplicialCholeskyBase>, /** \brief Give the absolute value of the determinant. * * \returns the absolute value of the determinant of the matrix of which - * *this is the QR decomposition. + * *this is the LU factorization. * * \warning a determinant can be very big or small, so for matrices * of large enough dimension, there is a risk of overflow/underflow. @@ -389,7 +389,7 @@ class SparseLU : public SparseSolverBase>, /** \brief Give the natural log of the absolute determinant. * * \returns the natural log of the absolute value of the determinant of the matrix - * of which **this is the QR decomposition + * of which *this is the LU factorization * * \note This method is useful to work around the risk of overflow/underflow that's * inherent to the determinant computation. diff --git a/Eigen/src/SuperLUSupport/SuperLUSupport.h b/Eigen/src/SuperLUSupport/SuperLUSupport.h index 4db924972..99f70cf76 100644 --- a/Eigen/src/SuperLUSupport/SuperLUSupport.h +++ b/Eigen/src/SuperLUSupport/SuperLUSupport.h @@ -487,7 +487,7 @@ class SuperLU : public SuperLUBase > { /** Performs a numeric decomposition of \a matrix * - * The given matrix must have the same sparsity than the matrix on which the symbolic decomposition has been + * The given matrix must have the same sparsity as the matrix on which the symbolic decomposition has been * performed. * * \sa analyzePattern() @@ -792,7 +792,7 @@ class SuperILU : public SuperLUBase > { /** Performs a numeric decomposition of \a matrix * - * The given matrix must have the same sparsity than the matrix on which the symbolic decomposition has been + * The given matrix must have the same sparsity as the matrix on which the symbolic decomposition has been * performed. * * \sa analyzePattern() diff --git a/Eigen/src/ThreadPool/ThreadLocal.h b/Eigen/src/ThreadPool/ThreadLocal.h index aa0bd1083..f3ad5cc70 100644 --- a/Eigen/src/ThreadPool/ThreadLocal.h +++ b/Eigen/src/ThreadPool/ThreadLocal.h @@ -90,7 +90,7 @@ struct ThreadLocalNoOpRelease { // // Eigen::ThreadLocal counter(10); // -// // Each thread will have access to it's own counter object. +// // Each thread will have access to its own counter object. // Counter& cnt = counter.local(); // cnt++; // diff --git a/Eigen/src/UmfPackSupport/UmfPackSupport.h b/Eigen/src/UmfPackSupport/UmfPackSupport.h index 22c701b97..a32331ce4 100644 --- a/Eigen/src/UmfPackSupport/UmfPackSupport.h +++ b/Eigen/src/UmfPackSupport/UmfPackSupport.h @@ -425,7 +425,7 @@ class UmfPackLU : public SparseSolverBase > { /** Performs a numeric decomposition of \a matrix * - * The given matrix must have the same sparsity than the matrix on which the pattern anylysis has been performed. + * The given matrix must have the same sparsity as the matrix on which the pattern analysis has been performed. * * \sa analyzePattern(), compute() */ diff --git a/Eigen/src/plugins/BlockMethods.inc b/Eigen/src/plugins/BlockMethods.inc index 0782aa39a..da2ac3f29 100644 --- a/Eigen/src/plugins/BlockMethods.inc +++ b/Eigen/src/plugins/BlockMethods.inc @@ -990,7 +990,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE typename ConstNColsBlockXpr::Type middl /// Example: \include MatrixBase_block_int_int.cpp /// Output: \verbinclude MatrixBase_block_int_int.out /// -/// \note The usage of of this overload is discouraged from %Eigen 3.4, better used the generic +/// \note The usage of this overload is discouraged from %Eigen 3.4, better use the generic /// block(Index,Index,NRowsType,NColsType), here is the one-to-one equivalence: /// \code /// mat.template block(i,j) <--> mat.block(i,j,fix,fix) @@ -1032,7 +1032,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const typename ConstFixedBlockXpr(i,j,rows,cols) <--> mat.block(i,j,fix(rows),fix(cols)) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h index 9bbf945f7..b9f066ead 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorReduction.h @@ -386,7 +386,7 @@ struct FullReducer { Barrier barrier(internal::convert_index(numblocks)); MaxSizeVector shards(numblocks, reducer.initialize()); for (Index i = 0; i < numblocks; ++i) { - auto run_shard = [i, blocksize, &self, &barrier, &shards, &reducer](){ + auto run_shard = [i, blocksize, &self, &barrier, &shards, &reducer]() { shards[i] = InnerMostDimReducer::reduce(self, i * blocksize, blocksize, reducer); barrier.Notify(); }; @@ -835,7 +835,7 @@ struct TensorReductionEvaluatorBase(Layout) == static_cast(ColMajor)) ? 0 : NumOutputDims - 1; - // TBD: extend this the the n innermost dimensions that we preserve. + // TBD: extend this to the n innermost dimensions that we preserve. if (((firstIndex % m_dimensions[innermost_dim]) + PacketSize - 1) < m_dimensions[innermost_dim]) { Op reducer(m_reducer); typename Self::PacketReturnType accum = reducer.template initializePacket();