mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix typos
This commit is contained in:
committed by
Charles Schlosser
parent
fd98cc49f1
commit
c593e9e948
@@ -898,7 +898,7 @@ containing the real part of the complex values of the original tensor.
|
||||
|
||||
### (Operation) imag()
|
||||
|
||||
Returns a tensor with the same dimensions as the orginal tensor
|
||||
Returns a tensor with the same dimensions as the original tensor
|
||||
containing the imaginary part of the complex values of the original
|
||||
tensor.
|
||||
|
||||
@@ -910,7 +910,7 @@ exponent.
|
||||
|
||||
The type of the exponent, Scalar, is always the same as the type of the
|
||||
tensor coefficients. For example, only integer exponents can be used in
|
||||
conjuntion with tensors of integer values.
|
||||
conjunction with tensors of integer values.
|
||||
|
||||
You can use cast() to lift this restriction. For example this computes
|
||||
cubic roots of an int Tensor:
|
||||
|
||||
@@ -104,10 +104,10 @@ struct TTPanelSize {
|
||||
static EIGEN_CONSTEXPR StorageIndex TileSizeDimM = LocalThreadSizeM * WorkLoadPerThreadM;
|
||||
// TileSizeDimN: determines the tile size for the n dimension
|
||||
static EIGEN_CONSTEXPR StorageIndex TileSizeDimN = LocalThreadSizeN * WorkLoadPerThreadN;
|
||||
// LoadPerThreadLhs: determines workload per thread for loading Lhs Tensor. This must be divisable by packetsize
|
||||
// LoadPerThreadLhs: determines workload per thread for loading Lhs Tensor. This must be divisible by packetsize
|
||||
static EIGEN_CONSTEXPR StorageIndex LoadPerThreadLhs =
|
||||
((TileSizeDimK * WorkLoadPerThreadM * WorkLoadPerThreadN) / (TileSizeDimN));
|
||||
// LoadPerThreadRhs: determines workload per thread for loading Rhs Tensor. This must be divisable by packetsize
|
||||
// LoadPerThreadRhs: determines workload per thread for loading Rhs Tensor. This must be divisible by packetsize
|
||||
static EIGEN_CONSTEXPR StorageIndex LoadPerThreadRhs =
|
||||
((TileSizeDimK * WorkLoadPerThreadM * WorkLoadPerThreadN) / (TileSizeDimM));
|
||||
// BC : determines if supporting bank conflict is required
|
||||
@@ -674,7 +674,7 @@ class TensorContractionKernel {
|
||||
for (StorageIndex wLPTN = 0; wLPTN < Properties::WorkLoadPerThreadN / PrivateNStride; wLPTN++) {
|
||||
// output leading dimension
|
||||
StorageIndex outputLD = 0;
|
||||
// When local memory is used the PrivateNstride is always 1 because the coalesed access on N is loaded into Local
|
||||
// When local memory is used the PrivateNstride is always 1 because the coalesced access on N is loaded into Local
|
||||
// memory and extracting from local to global is the same as no transposed version. However, when local memory is
|
||||
// not used and RHS is transposed we packetize the load for RHS.
|
||||
EIGEN_UNROLL_LOOP
|
||||
@@ -898,7 +898,7 @@ class TensorContractionKernel {
|
||||
EIGEN_CONSTEXPR StorageIndex LSD = InputBlockProperties::is_rhs ? LSDR : LSDL;
|
||||
static_assert(((LocalOffset % (TileSizeDimNC / InputBlockProperties::nc_stride) == 0) &&
|
||||
(LocalOffset % (Properties::TileSizeDimK / InputBlockProperties::c_stride) == 0)),
|
||||
" LocalOffset must be divisable by stride");
|
||||
" LocalOffset must be divisible by stride");
|
||||
const StorageIndex &NC = InputBlockProperties::is_rhs ? triple_dim.N : triple_dim.M;
|
||||
StorageIndex localThreadNC = local_index.first;
|
||||
StorageIndex localThreadC = local_index.second;
|
||||
|
||||
@@ -36,7 +36,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T* constCast(const T* data) {
|
||||
// used for referring to a Pointer on TensorEvaluator class. While the TensorExpression
|
||||
// is a device-agnostic type and need MakePointer class for type conversion,
|
||||
// the TensorEvaluator class can be specialized for a device, hence it is possible
|
||||
// to construct different types of temproray storage memory in TensorEvaluator
|
||||
// to construct different types of temporary storage memory in TensorEvaluator
|
||||
// for different devices by specializing the following StorageMemory class.
|
||||
template <typename T, typename device>
|
||||
struct StorageMemory : MakePointer<T> {};
|
||||
|
||||
@@ -136,7 +136,7 @@ class UniformRandomGenerator {
|
||||
// thread but for SYCL ((CLOCK * 6364136223846793005ULL) + 0xda3e39cb94b95bdbULL) is passed to each thread and each
|
||||
// thread adds the (global_thread_id* 6364136223846793005ULL) for itself only once, in order to complete the
|
||||
// construction similar to CUDA Therefore, the thread Id injection is not available at this stage.
|
||||
// However when the operator() is called the thread ID will be available. So inside the opeator,
|
||||
// However when the operator() is called the thread ID will be available. So inside the operator,
|
||||
// we add the thrreadID, BlockId,... (which is equivalent of i)
|
||||
// to the seed and construct the unique m_state per thead similar to cuda.
|
||||
m_exec_once = false;
|
||||
|
||||
@@ -433,7 +433,7 @@ struct PartialReducerLauncher {
|
||||
EIGEN_CONSTEXPR Index localRange = PannelParameters::LocalThreadSizeP * PannelParameters::LocalThreadSizeR;
|
||||
// In this step, we force the code not to be more than 2-step reduction:
|
||||
// Our empirical research shows that if each thread reduces at least 64
|
||||
// elemnts individually, we get better performance. However, this can change
|
||||
// elements individually, we get better performance. However, this can change
|
||||
// on different platforms. In this step we force the code not to be
|
||||
// morthan step reduction: Our empirical research shows that for inner_most
|
||||
// dim reducer, it is better to have 8 group in a reduce dimension for sizes
|
||||
@@ -495,7 +495,7 @@ struct FullReducer<Self, Op, Eigen::SyclDevice, Vectorizable> {
|
||||
typename Self::Index inputSize = self.impl().dimensions().TotalSize();
|
||||
// In this step we force the code not to be more than 2-step reduction:
|
||||
// Our empirical research shows that if each thread reduces at least 512
|
||||
// elemnts individually, we get better performance.
|
||||
// elements individually, we get better performance.
|
||||
const Index reductionPerThread = 2048;
|
||||
// const Index num_work_group =
|
||||
Index reductionGroup = dev.getPowerOfTwo(
|
||||
|
||||
@@ -275,7 +275,7 @@ const typename NNLS<MatrixType>::SolutionVectorType &NNLS<MatrixType>::solve(con
|
||||
const Index numActive = A_.cols() - numInactive_;
|
||||
Index argmaxGradient = -1;
|
||||
const Scalar maxGradient = gradient_(index_sets_.tail(numActive)).maxCoeff(&argmaxGradient);
|
||||
argmaxGradient += numInactive_; // beacause tail() skipped the first numInactive_ elements
|
||||
argmaxGradient += numInactive_; // because tail() skipped the first numInactive_ elements
|
||||
|
||||
if (maxGradient < tolerance_) {
|
||||
info_ = ComputationInfo::Success;
|
||||
@@ -299,7 +299,7 @@ const typename NNLS<MatrixType>::SolutionVectorType &NNLS<MatrixType>::solve(con
|
||||
solveInactiveSet_(b);
|
||||
++iterations_; // The solve is expensive, so that is what we count as an iteration.
|
||||
|
||||
// Check feasability...
|
||||
// Check feasibility...
|
||||
bool feasible = true;
|
||||
Scalar alpha = NumTraits<Scalar>::highest();
|
||||
Index infeasibleIdx = -1; // Which variable became infeasible first.
|
||||
|
||||
@@ -70,7 +70,7 @@ bool bicgstabl(const MatrixType &mat, const Rhs &rhs, Dest &x, const Preconditio
|
||||
rHat.col(0) = rhs - mat * x0; // r_0
|
||||
|
||||
x.setZero(); // This will contain the updates to the solution.
|
||||
// rShadow is arbritary, but must never be orthogonal to any residual.
|
||||
// rShadow is arbitrary, but must never be orthogonal to any residual.
|
||||
VectorType rShadow = VectorType::Random(N);
|
||||
|
||||
VectorType x_prime = x;
|
||||
@@ -313,7 +313,7 @@ class BiCGSTABL : public IterativeSolverBase<BiCGSTABL<MatrixType_, Precondition
|
||||
|
||||
/** \internal */
|
||||
/** Loops over the number of columns of b and does the following:
|
||||
1. sets the tolerence and maxIterations
|
||||
1. sets the tolerance and maxIterations
|
||||
2. Calls the function that has the core solver routine
|
||||
*/
|
||||
template <typename Rhs, typename Dest>
|
||||
|
||||
@@ -150,7 +150,7 @@ bool idrstabl(const MatrixType &mat, const Rhs &rhs, Dest &x, const Precondition
|
||||
without any additional MV.
|
||||
|
||||
Contrary to what one would suspect, the comparison with ==0.0 for
|
||||
floating-point types is intended here. Any arbritary non-zero u is fine
|
||||
floating-point types is intended here. Any arbitrary non-zero u is fine
|
||||
to continue, however if u contains either NaN or Inf the algorithm will
|
||||
break down.
|
||||
*/
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Eigen {
|
||||
*/
|
||||
template <typename Scalar>
|
||||
class KahanSum {
|
||||
// Straighforward Kahan summation for accurate accumulation of a sum of numbers
|
||||
// Straightforward Kahan summation for accurate accumulation of a sum of numbers
|
||||
Scalar _sum{};
|
||||
Scalar _correction{};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user