Skip to content

Commit

Permalink
Fix typos in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoemi09 committed Jun 3, 2024
1 parent 438489e commit e8c52f3
Show file tree
Hide file tree
Showing 23 changed files with 48 additions and 48 deletions.
4 changes: 2 additions & 2 deletions c++/nda/_impl_basic_array_view_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

/**
* @brief Get a range that generates all valid index tuples.
* @return An `itertools::mulitplied` range that can be used to iterate over all valid index tuples.
* @return An `itertools::multiplied` range that can be used to iterate over all valid index tuples.
*/
[[nodiscard]] auto indices() const noexcept { return itertools::product_range(shape()); }

Expand Down Expand Up @@ -227,7 +227,7 @@ FORCEINLINE static decltype(auto) call(Self &&self, Ts const &...idxs) noexcept(
* @brief Function call operator to access the view/array.
*
* @details Depending on the type of the calling object and the given arguments, this function call does the following:
* - If any of the arugments is lazy, an nda::clef::expr with the nda::clef::tags::function tag is returned.
* - If any of the arguments is lazy, an nda::clef::expr with the nda::clef::tags::function tag is returned.
* - If no arguments are given, a full view of the calling object is returned:
* - If the calling object itself or its value type is const, a view with a const value type is returned.
* - Otherwise, a view with a non-const value type is returned.
Expand Down
16 changes: 8 additions & 8 deletions c++/nda/arithmetic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ namespace nda {
* @details A lazy binary expression contains a two operands and a binary operation. It fulfills the nda::Array
* concept and can therefore be used in any other expression or function that expects an nda::Array type.
*
* The supported binary operations are addition ('+'), substraction ('-'), multiplication ('*') and division ('/').
* The supported binary operations are addition ('+'), subtraction ('-'), multiplication ('*') and division ('/').
*
* @tparam OP Char representing the unary operation.
* @param L nda::ArrayOrScalar type of left hand side.
Expand All @@ -116,7 +116,7 @@ namespace nda {
/// Decay type of the right hand side operand.
using R_t = std::decay_t<R>;

// FIXME : we should use is_scalar_for_v but the trait needs work to accomodate scalar L or R
// FIXME : we should use is_scalar_for_v but the trait needs work to accommodate scalar L or R
/// Constexpr variable that is true if the left hand side operand is a scalar.
static constexpr bool l_is_scalar = nda::is_scalar_v<L>;

Expand Down Expand Up @@ -259,7 +259,7 @@ namespace nda {
/**
* @brief Subscript operator.
*
* @details Simply fowards the argument to the function call operator.
* @details Simply forwards the argument to the function call operator.
*
* @tparam Arg Type of the argument.
* @param arg Subscript argument.
Expand Down Expand Up @@ -400,7 +400,7 @@ namespace nda {
* - 'M' * 'M': Matrix-matrix multiplication calls nda::matmul and returns the result.
* - 'M' * 'V': Matrix-vector multiplication calls nda::matvecmul and returns the result.
*
* Obvious restrictons on the ranks and shapes of the input arrays apply.
* Obvious restrictions on the ranks and shapes of the input arrays apply.
*
* @tparam L nda::Array type of left hand side.
* @tparam R nda::Array type of right hand side.
Expand Down Expand Up @@ -471,13 +471,13 @@ namespace nda {
}

/**
* @brief Divison operator for two nda::Array types.
* @brief Division operator for two nda::Array types.
*
* @details The input arrays must have one of the following algebras:
* - 'A' / 'A': Elementwise division of two arrays returns a lazy nda::expr object.
* - 'M' / 'M': Multiplies the lhs matrix with the inverse of the rhs matrix and returns the result.
*
* Obvious restrictons on the ranks and shapes of the input arrays apply.
* Obvious restrictions on the ranks and shapes of the input arrays apply.
*
* @tparam L nda::Array type of left hand side.
* @tparam R nda::Array type of right hand side.
Expand Down Expand Up @@ -511,7 +511,7 @@ namespace nda {
}

/**
* @brief Divsion operator for an nda::Array and an nda::Scalar.
* @brief Division operator for an nda::Array and an nda::Scalar.
*
* @details It performs lazy elementwise division.
*
Expand All @@ -537,7 +537,7 @@ namespace nda {
* @tparam A nda::Array type.
* @param s nda::Scalar left hand side operand.
* @param a nda::Array right hand side operand.
* @return Lazy binary expression for the divsion operation (multiplication in case of a matrix).
* @return Lazy binary expression for the division operation (multiplication in case of a matrix).
*/
template <Scalar S, Array A>
Array auto operator/(S &&s, A &&a) { // NOLINT (S&& is mandatory for proper concept Array <: typename to work)
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/clef/auto_assign.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ namespace nda::clef {
clef_auto_assign(std::get<0>(ex.childs), make_function(std::forward<RHS>(rhs), placeholder<Is>()...));
}

// Delete functions to avoid non-sensical cases, e.g. f(x_ + y_) << RHS.
// Delete functions to avoid nonsensical cases, e.g. f(x_ + y_) << RHS.
template <typename F, typename RHS, typename... T>
void operator<<(expr<tags::function, F, T...> &&ex, RHS &&rhs) = delete; // NOLINT (no forwarding required here)
template <typename F, typename RHS, typename... T>
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/clef/auto_assign_subscript.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace nda::clef {
clef_auto_assign_subscript(std::get<0>(ex.childs), make_function(std::forward<RHS>(rhs), placeholder<Is>()...));
}

// Delete functions to avoid non-sensical cases, e.g. f[x_ + y_] = RHS.
// Delete functions to avoid nonsensical cases, e.g. f[x_ + y_] = RHS.
template <typename F, typename RHS, typename... T>
void operator<<(expr<tags::subscript, F, T...> &&ex, RHS &&rhs) = delete; // NOLINT (no forwarding required here)
template <typename F, typename RHS, typename... T>
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/clef/io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace nda::clef {
}

/**
* @brief Print an nda::clef::make_fun_impl obejct to std::ostream.
* @brief Print an nda::clef::make_fun_impl object to std::ostream.
*
* @tparam Expr Type of the expression.
* @tparam Is Integer labels of the placeholders in the expression.
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/clef/operation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace nda::clef {
template <typename Tag>
struct operation;

/// Specializtion of nda::clef::operation for nda::clef::tags::terminal.
/// Specialization of nda::clef::operation for nda::clef::tags::terminal.
template <>
struct operation<tags::terminal> {
/**
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ namespace nda {
concept StdArrayOfLong = detail::is_std_array_of_long_v<T>;

/**
* @brief Check if a given type is either an arthmetic or complex type.
* @brief Check if a given type is either an arithmetic or complex type.
* @tparam S Type to check.
*/
template <typename S>
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ namespace nda {

#else

/// Trigger a compilation error everytime the nda::device_error_check function is called.
/// Trigger a compilation error every time the nda::device_error_check function is called.
#define device_error_check(ARG1, ARG2) compile_error_no_gpu()

/// Constexpr variable that is true if the project is configured with GPU support.
Expand Down
12 changes: 6 additions & 6 deletions c++/nda/iterators.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace nda {
// N-dimensional rectangular grid iterator in C traversal order.
template <int Rank>
class grid_iterator {
// Stride or number of elements to skip when incresing the iterator in the current dimension.
// Stride or number of elements to skip when increasing the iterator in the current dimension.
long stri = 0;

// Position of the iterator in the current dimension.
Expand Down Expand Up @@ -117,7 +117,7 @@ namespace nda {
// Specialization of nda::grid_iterator for 1-dimensional grids.
template <>
class grid_iterator<1> {
// Stride or number of elements to skip when incresing the iterator.
// Stride or number of elements to skip when increasing the iterator.
long stri = 0;

// Position of the iterator.
Expand Down Expand Up @@ -169,7 +169,7 @@ namespace nda {
return *this;
}

// Compund assignment addition operator increments the offset by n times the stride and the position by n.
// Compound assignment addition operator increments the offset by n times the stride and the position by n.
grid_iterator &operator+=(std::ptrdiff_t n) {
offset += n * stri;
pos += n;
Expand All @@ -179,7 +179,7 @@ namespace nda {
// Binary addition of a grid iterator and an integer.
[[nodiscard]] friend grid_iterator operator+(grid_iterator it, std::ptrdiff_t n) { return it += n; }

// Binaray subtraction of two grid iterators.
// Binary subtraction of two grid iterators.
[[nodiscard]] friend std::ptrdiff_t operator-(grid_iterator const &lhs, grid_iterator const &rhs) { return lhs.pos - rhs.pos; }

// True if the position of the left hand side iterator is less than the position of the right hand side iterator,
Expand Down Expand Up @@ -433,7 +433,7 @@ namespace nda {
[[nodiscard]] bool operator!=(array_iterator const &other) const { return (!operator==(other)); }

/**
* @brief Compund assignment addition operator increments the iterator a given number of times.
* @brief Compound assignment addition operator increments the iterator a given number of times.
*
* @param n Number of times to increment the iterator.
* @return Reference to the current iterator.
Expand All @@ -444,7 +444,7 @@ namespace nda {
}

/**
* @brief Compund assignment subtraction operator decrements the iterator a given number of times.
* @brief Compound assignment subtraction operator decrements the iterator a given number of times.
*
* @param n Number of times to decrement the iterator.
* @return Reference to the current iterator.
Expand Down
6 changes: 3 additions & 3 deletions c++/nda/lapack/gelss_worker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace nda::lapack {
gelss_worker(matrix<T> A_) : M(A_.extent(0)), N(A_.extent(1)), A(std::move(A_)), s_vec(std::min(M, N)) {
if (N > M) NDA_RUNTIME_ERROR << "Error in nda::lapack::gelss_worker: Matrix A cannot have more columns than rows";

// intialize matrices
// initialize matrices
matrix<T, F_layout> A_FL{A};
matrix<T, F_layout> U(M, M);
matrix<T, F_layout> VH(N, N);
Expand Down Expand Up @@ -220,8 +220,8 @@ namespace nda::lapack {

// We reshape the Matrix into a dim=4 array and swap the two innermost indices

// FIXME OLD CODE SUPRRESS AFTER PORTING
// FIXME We would like to write: tranpose(reshape(idx_map, {l[0], N, d, d}), {0, 1, 3, 2})
// FIXME OLD CODE SURPRESS AFTER PORTING
// FIXME We would like to write: transpose(reshape(idx_map, {l[0], N, d, d}), {0, 1, 3, 2})
// auto idx_map_inner_transpose = array_view<dcomplex, 4>::layout_t{{l[0], N, d, d}, {s[0], d * d * s[1], s[1], d * s[1]}};
// Deep copy
//array<dcomplex, 4> arr_dag = conj(array_const_view<dcomplex, 4>{idx_map_inner_transpose, M.storage()});
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/lapack/getrf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace nda::lapack {
auto dm = std::min(a.extent(0), a.extent(1));
if (ipiv.size() < dm) ipiv.resize(dm); // ipiv needs to be a regular array?

// must be lapack compatiblem
// must be lapack compatible
EXPECTS(a.indexmap().min_stride() == 1);
EXPECTS(ipiv.indexmap().min_stride() == 1);

Expand Down
2 changes: 1 addition & 1 deletion c++/nda/lapack/ungqr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace nda::lapack {
*
* @tparam A nda::MemoryMatrix with complex value type.
* @tparam TAU nda::MemoryVector with complex value type.
* @param a Input/output matrix. On entry, the i-th column must contain the vector whichdefines the elementary
* @param a Input/output matrix. On entry, the i-th column must contain the vector which defines the elementary
* reflector \f$ H(i) \; , i = 1,2,...,K \f$, as returned by `geqrf` in the first k columns. On exit, the m-by-n
* matrix \f$ \mathbf{Q} \f$.
* @param tau Input vector. `tau(i)` must contain the scalar factor of the elementary reflector \f$ \mathbf{H}(i) \f$,
Expand Down
4 changes: 2 additions & 2 deletions c++/nda/layout/policies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace nda {
/// @endcond

/**
* @brief Contigous layout policy with C-order (row-major order).
* @brief Contiguous layout policy with C-order (row-major order).
* @details The last dimension varies the fastest, the first dimension varies the slowest.
*/
struct C_layout {
Expand All @@ -57,7 +57,7 @@ namespace nda {
};

/**
* @brief Contigous layout policy with Fortran-order (column-major order).
* @brief Contiguous layout policy with Fortran-order (column-major order).
* @details The first dimension varies the fastest, the last dimension varies the slowest.
*/
struct F_layout {
Expand Down
8 changes: 4 additions & 4 deletions c++/nda/layout/rect_str.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ namespace nda {
// type of sliced nda::rect_str
using new_rect_str_t = typename detail::rect_str_from_base<std::decay_t<decltype(idxm2)>>::type;

// if the string indices have not been intialized, simply return a new nda::rect_str with the sliced nda::idx_map
// if the string indices have not been initialized, simply return a new nda::rect_str with the sliced nda::idx_map
if (not s_indices) return std::make_pair(offset, new_rect_str_t{idxm2});

// otherwise slice the string indices as well (not optimized but simple)
Expand Down Expand Up @@ -336,7 +336,7 @@ namespace nda {
// type of transposed nda::rect_str
using new_rect_str_t = typename detail::rect_str_from_base<std::decay_t<decltype(idxm2)>>::type;

// if the string indices have not been intialized, simply return the transposed nda::rect_str
// if the string indices have not been initialized, simply return the transposed nda::rect_str
if (not s_indices) return new_rect_str_t{idxm2};

// otherwise transpose the string indices as well
Expand All @@ -361,7 +361,7 @@ namespace nda {
/// @endcond

/**
* @brief Contigous layout policy with C-order (row-major order) and possible string indices.
* @brief Contiguous layout policy with C-order (row-major order) and possible string indices.
* @details The last dimension varies the fastest, the first dimension varies the slowest.
*/
struct C_layout_str {
Expand All @@ -377,7 +377,7 @@ namespace nda {
};

/**
* @brief Contigous layout policy with Fortran-order (column-major order) and possible string indices.
* @brief Contiguous layout policy with Fortran-order (column-major order) and possible string indices.
* @details The first dimension varies the fastest, the last dimension varies the slowest.
*/
struct F_layout_str {
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/layout_transforms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace nda {
/**
* @brief Reshape an nda::basic_array or nda::basic_array_view.
*
* @details The input array/view is assumed to be contiguous and in C- or Fortan-order and the size of the reshaped
* @details The input array/view is assumed to be contiguous and in C- or Fortran-order and the size of the reshaped
* array/view must be the same as the input.
*
* It calls nda::map_layout_transform with the given shape.
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/linalg/matmul.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ namespace nda {
// check address space compatibility
static constexpr auto L_adr_spc = mem::get_addr_space<A>;
static constexpr auto R_adr_spc = mem::get_addr_space<X>;
static_assert(L_adr_spc == R_adr_spc, "Error in nda::matvecmul: Matrix-vector product requires arguments with same adress spaces");
static_assert(L_adr_spc == R_adr_spc, "Error in nda::matvecmul: Matrix-vector product requires arguments with same address spaces");
static_assert(L_adr_spc != mem::None);

// get resulting value type and vector type
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ namespace nda {
/**
* @brief A lazy function call expression on arrays/views.
*
* @details The lazy expression call fullfils the nda::Array concept and can therefore be assigned to other
* @details The lazy expression call fulfils the nda::Array concept and can therefore be assigned to other
* nda::basic_array or nda::basic_array_view objects. For example:
*
* @code{.cpp}
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/mem/address_space.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace nda::mem {
*/

/**
* @brief Enum providing idientifiers for the different memory address spaces.
* @brief Enum providing identifiers for the different memory address spaces.
*
* @details The following address spaces are available:
* - `None`: No address space.
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/stdutil/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ namespace nda::stdutil {
* @tparam R Size of the input array.
* @param a Input std::array.
* @param x Element to prepend.
* @return A copy of the input array with the additonal element prepended at the front.
* @return A copy of the input array with the additional element prepended at the front.
*/
template <typename T, typename U, size_t R>
constexpr std::array<T, R + 1> front_append(std::array<T, R> const &a, U const &x) {
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/sym_grp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace nda {
* @brief Multiplication operator for two operations.
*
* @details The sign flip (complex conjugation) operation is set to true in the resulting product iff one of the two
* (exlusive or!) input operations has the sign flip (complex conjugation) operation set to true.
* (exclusive or!) input operations has the sign flip (complex conjugation) operation set to true.
*
* @param rhs Right hand side operation.
* @return The resulting operation.
Expand Down
2 changes: 1 addition & 1 deletion c++/nda/traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ namespace nda {
* @brief Checks if a layout property has the `smallest_stride_is_one` property.
*
* @param lp nda::layout_prop_e to check.
* @return True if it has the `smalles_stride_is_one` property, false otherwise.
* @return True if it has the `smallest_stride_is_one` property, false otherwise.
*/
inline constexpr bool has_smallest_stride_is_one(layout_prop_e lp) { return uint64_t(lp) & uint64_t(layout_prop_e::smallest_stride_is_one); }

Expand Down
8 changes: 4 additions & 4 deletions doc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Find below an itemized list of changes in this release.
* Enable slicing with ranges that have negative steps + test
* Make basic_array(idx_map, &&mem_handle) constructor public
* Allow temporaries in calls to lapack wrapping functions
* Generlize nda_lapack test to run both double and complex versions
* Generalize nda_lapack test to run both double and complex versions
* Add blas::has_C_layout and blas::has_F_layout traits and use for cleanup
* Generalize nda_blas and nda_cublas test for various value_t and layout combinations
* In make_regular do not invoke copy of regular arrays
Expand Down Expand Up @@ -120,9 +120,9 @@ Find below an itemized list of changes in this release.
* Remove REQUIRES macro and use 'requires'
* Enable slicing also for h5_write operations, assume existing dataset
* Make pivot array const in getri signature
* Minor cleanup in nda/h5.hpp template contraints and doc
* Minor cleanup in nda/h5.hpp template constraints and doc
* Allow to pass dimensions as integers to factory functions basic_array::ones/zeros/rand
* Add the 1d array factory nda::arange mimicing numpy arange + test
* Add the 1d array factory nda::arange mimicking numpy arange + test
* Allow bound checks also for array.extent(int) function
* Configure and install nda/version.hpp header
* Synchronize clang-tidy config file with app4triqs
Expand Down Expand Up @@ -159,7 +159,7 @@ Find below an itemized list of changes in this release.
### Concepts
* Use C++20 concepts to constrain various generic functions and classes
* Introduce concepts: Array, MemoryArray, Matrix, Vector, Handle
* Various concept related simplififications and refactorings
* Various concept related simplifications and refactoring

### GPU Support
* Introduce GPU support for arrays and views
Expand Down
Loading

0 comments on commit e8c52f3

Please sign in to comment.