mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix various typos
This commit is contained in:
committed by
Antonio Sánchez
parent
3753e6a2b3
commit
4b6036e276
@@ -23,7 +23,7 @@ template<typename ExpressionType> class MatrixWrapper;
|
||||
*
|
||||
* An array is similar to a dense vector or matrix. While matrices are mathematical
|
||||
* objects with well defined linear algebra operators, an array is just a collection
|
||||
* of scalar values arranged in a one or two dimensionnal fashion. As the main consequence,
|
||||
* of scalar values arranged in a one or two dimensional fashion. As the main consequence,
|
||||
* all operations applied to an array are performed coefficient wise. Furthermore,
|
||||
* arrays support scalar math functions of the c++ standard library (e.g., std::sin(x)), and convenient
|
||||
* constructors allowing to easily write generic code working for both scalar values
|
||||
|
||||
@@ -45,7 +45,7 @@ class DenseCoeffsBase<Derived,ReadOnlyAccessors> : public EigenBase<Derived>
|
||||
// - This is the return type of the coeff() method.
|
||||
// - The LvalueBit means exactly that we can offer a coeffRef() method, which means exactly that we can get references
|
||||
// to coeffs, which means exactly that we can have coeff() return a const reference (as opposed to returning a value).
|
||||
// - The is_artihmetic check is required since "const int", "const double", etc. will cause warnings on some systems
|
||||
// - The is_arithmetic check is required since "const int", "const double", etc. will cause warnings on some systems
|
||||
// while the declaration of "const T", where T is a non arithmetic type does not. Always returning "const Scalar&" is
|
||||
// not possible, since the underlying expressions might not offer a valid address the reference could be referring to.
|
||||
typedef typename internal::conditional<bool(internal::traits<Derived>::Flags&LvalueBit),
|
||||
|
||||
@@ -429,8 +429,8 @@ struct generic_product_impl<Lhs,Rhs,DenseShape,DenseShape,CoeffBasedProductMode>
|
||||
// 3 - it makes this fallback consistent with the heavy GEMM routine.
|
||||
// 4 - it fully by-passes huge stack allocation attempts when multiplying huge fixed-size matrices.
|
||||
// (see https://stackoverflow.com/questions/54738495)
|
||||
// For small fixed sizes matrices, howver, the gains are less obvious, it is sometimes x2 faster, but sometimes x3 slower,
|
||||
// and the behavior depends also a lot on the compiler... This is why this re-writting strategy is currently
|
||||
// For small fixed sizes matrices, however, the gains are less obvious, it is sometimes x2 faster, but sometimes x3 slower,
|
||||
// and the behavior depends also a lot on the compiler... This is why this re-writing strategy is currently
|
||||
// enabled only when falling back from the main GEMM.
|
||||
template<typename Dst, typename Func>
|
||||
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
|
||||
|
||||
@@ -300,7 +300,7 @@ template<typename PlainObjectType, int Options, typename StrideType> class Ref
|
||||
typename internal::enable_if<bool(Traits::template match<Derived>::MatchAtCompileTime),Derived>::type* = 0)
|
||||
{
|
||||
EIGEN_STATIC_ASSERT(bool(Traits::template match<Derived>::MatchAtCompileTime), STORAGE_LAYOUT_DOES_NOT_MATCH);
|
||||
// Construction must pass since we will not create temprary storage in the non-const case.
|
||||
// Construction must pass since we will not create temporary storage in the non-const case.
|
||||
const bool success = Base::construct(expr.derived());
|
||||
EIGEN_UNUSED_VARIABLE(success)
|
||||
eigen_assert(success);
|
||||
|
||||
@@ -262,7 +262,7 @@ namespace half_impl {
|
||||
#if (defined(EIGEN_HAS_CUDA_FP16) && defined(EIGEN_CUDA_ARCH) && \
|
||||
EIGEN_CUDA_ARCH >= 530) || \
|
||||
(defined(EIGEN_HAS_HIP_FP16) && defined(HIP_DEVICE_COMPILE))
|
||||
// Note: We deliberatly do *not* define this to 1 even if we have Arm's native
|
||||
// Note: We deliberately do *not* define this to 1 even if we have Arm's native
|
||||
// fp16 type since GPU halfs are rather different from native CPU halfs.
|
||||
// TODO: Rename to something like EIGEN_HAS_NATIVE_GPU_FP16
|
||||
#define EIGEN_HAS_NATIVE_FP16
|
||||
|
||||
@@ -622,7 +622,7 @@ template<> EIGEN_STRONG_INLINE Packet4i pabs(const Packet4i& a)
|
||||
#ifdef EIGEN_VECTORIZE_SSE4_1
|
||||
template<> EIGEN_STRONG_INLINE Packet4f pround<Packet4f>(const Packet4f& a)
|
||||
{
|
||||
// Unfortunatly _mm_round_ps doesn't have a rounding mode to implement numext::round.
|
||||
// Unfortunately _mm_round_ps doesn't have a rounding mode to implement numext::round.
|
||||
const Packet4f mask = pset1frombits<Packet4f>(0x80000000u);
|
||||
const Packet4f prev0dot5 = pset1frombits<Packet4f>(0x3EFFFFFFu);
|
||||
return _mm_round_ps(padd(por(pand(a, mask), prev0dot5), a), _MM_FROUND_TO_ZERO);
|
||||
|
||||
@@ -168,7 +168,7 @@ class PointerMapper {
|
||||
/**
|
||||
* Obtain the insertion point in the pointer map for
|
||||
* a pointer of the given size.
|
||||
* \param requiredSize Size attemted to reclaim
|
||||
* \param requiredSize Size attempted to reclaim
|
||||
*/
|
||||
typename pointerMap_t::iterator get_insertion_point(size_t requiredSize) {
|
||||
typename pointerMap_t::iterator retVal;
|
||||
|
||||
@@ -358,7 +358,7 @@ struct functor_traits<scalar_pow_op<Scalar,Exponent> > {
|
||||
PacketAccess = (!NumTraits<Scalar>::IsComplex && !NumTraits<Scalar>::IsInteger &&
|
||||
packet_traits<Scalar>::HasExp && packet_traits<Scalar>::HasLog &&
|
||||
packet_traits<Scalar>::HasRound && packet_traits<Scalar>::HasCmp &&
|
||||
// Temporarly disable packet access for half/bfloat16 until
|
||||
// Temporarily disable packet access for half/bfloat16 until
|
||||
// accuracy is improved.
|
||||
!is_same<Scalar, half>::value && !is_same<Scalar, bfloat16>::value
|
||||
)
|
||||
|
||||
@@ -1037,7 +1037,7 @@ struct scalar_logistic_op {
|
||||
* Uses just a 9/10-degree rational interpolant which
|
||||
* interpolates 1/(1+exp(-x)) - 0.5 up to a couple of ulps in the range
|
||||
* [-9, 18]. Below -9 we use the more accurate approximation
|
||||
* 1/(1+exp(-x)) ~= exp(x), and above 18 the logistic function is 1 withing
|
||||
* 1/(1+exp(-x)) ~= exp(x), and above 18 the logistic function is 1 within
|
||||
* one ulp. The shifted logistic is interpolated because it was easier to
|
||||
* make the fit converge.
|
||||
*
|
||||
|
||||
@@ -797,7 +797,7 @@ public:
|
||||
typedef typename conditional<Vectorizable,ScalarPacket,Scalar>::type ResPacket;
|
||||
typedef typename conditional<Vectorizable,DoublePacketType,Scalar>::type AccPacket;
|
||||
|
||||
// this actualy holds 8 packets!
|
||||
// this actually holds 8 packets!
|
||||
typedef QuadPacket<RhsPacket> RhsPacketx4;
|
||||
|
||||
EIGEN_STRONG_INLINE void initAcc(Scalar& p) { p = Scalar(0); }
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
|
||||
/* Optimized col-major matrix * vector product:
|
||||
* This algorithm processes the matrix per vertical panels,
|
||||
* which are then processed horizontaly per chunck of 8*PacketSize x 1 vertical segments.
|
||||
* which are then processed horizontally per chunck of 8*PacketSize x 1 vertical segments.
|
||||
*
|
||||
* Mixing type logic: C += alpha * A * B
|
||||
* | A | B |alpha| comments
|
||||
|
||||
@@ -649,7 +649,7 @@
|
||||
|
||||
|
||||
// The macros EIGEN_HAS_CXX?? defines a rough estimate of available c++ features
|
||||
// but in practice we should not rely on them but rather on the availabilty of
|
||||
// but in practice we should not rely on them but rather on the availability of
|
||||
// individual features as defined later.
|
||||
// This is why there is no EIGEN_HAS_CXX17.
|
||||
// FIXME: get rid of EIGEN_HAS_CXX14 and maybe even EIGEN_HAS_CXX11.
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Eigen {
|
||||
/**
|
||||
* Serializes an object to a memory buffer.
|
||||
*
|
||||
* Useful for transfering data (e.g. back-and-forth to a device).
|
||||
* Useful for transferring data (e.g. back-and-forth to a device).
|
||||
*/
|
||||
template<typename T, typename EnableIf = void>
|
||||
class Serializer;
|
||||
|
||||
@@ -261,7 +261,7 @@ template<typename MatrixType_> class ComplexSchur
|
||||
friend struct internal::complex_schur_reduce_to_hessenberg<MatrixType, NumTraits<Scalar>::IsComplex>;
|
||||
};
|
||||
|
||||
/** If m_matT(i+1,i) is neglegible in floating point arithmetic
|
||||
/** If m_matT(i+1,i) is negligible in floating point arithmetic
|
||||
* compared to m_matT(i,i) and m_matT(j,j), then set it to zero and
|
||||
* return true, else return false. */
|
||||
template<typename MatrixType>
|
||||
|
||||
@@ -54,7 +54,7 @@ template<typename Derived> struct traits<SVDBase<Derived> >
|
||||
* singular vectors. Asking for \em thin \a U or \a V means asking for only their \a m first columns to be formed. So \a U is then a n-by-m matrix,
|
||||
* and \a V is then a p-by-m matrix. Notice that thin \a U and \a V are all you need for (least squares) solving.
|
||||
*
|
||||
* The status of the computation can be retrived using the \a info() method. Unless \a info() returns \a Success, the results should be not
|
||||
* The status of the computation can be retrieved using the \a info() method. Unless \a info() returns \a Success, the results should be not
|
||||
* considered well defined.
|
||||
*
|
||||
* If the input matrix has inf or nan coefficients, the result of the computation is undefined, and \a info() will return \a InvalidInput, but the computation is guaranteed to
|
||||
|
||||
@@ -469,7 +469,7 @@ template<typename ArgType, int BlockRows, int BlockCols, bool InnerPanel>
|
||||
class unary_evaluator<Block<ArgType,BlockRows,BlockCols,InnerPanel>, IteratorBased>::InnerVectorInnerIterator
|
||||
: public EvalIterator
|
||||
{
|
||||
// NOTE MSVC fails to compile if we don't explicitely "import" IsRowMajor from unary_evaluator
|
||||
// NOTE MSVC fails to compile if we don't explicitly "import" IsRowMajor from unary_evaluator
|
||||
// because the base class EvalIterator has a private IsRowMajor enum too. (bug #1786)
|
||||
// NOTE We cannot call it IsRowMajor because it would shadow unary_evaluator::IsRowMajor
|
||||
enum { XprIsRowMajor = unary_evaluator::IsRowMajor };
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/** \returns an expression of the difference of \c *this and \a other
|
||||
*
|
||||
* \note If you want to substract a given scalar from all coefficients, see Cwise::operator-().
|
||||
* \note If you want to subtract a given scalar from all coefficients, see Cwise::operator-().
|
||||
*
|
||||
* \sa class CwiseBinaryOp, operator-=()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user