From 50abc5fef54fe65327879da329cc3cd4f5989d4a Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Sun, 29 Oct 2023 14:08:39 +0000 Subject: [PATCH] Fix spelling --- .codespellrc | 3 +++ .github/workflows/codespell.yml | 9 +++++++ include/bmat8.hpp | 8 +++--- include/epu.hpp | 44 ++++++++++++++++----------------- include/epu_impl.hpp | 2 +- include/power.hpp | 2 +- 6 files changed, 40 insertions(+), 28 deletions(-) create mode 100644 .codespellrc create mode 100644 .github/workflows/codespell.yml diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..59e07a79 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,3 @@ +[codespell] +skip = ./include/simde,./.git,./benchmark/python,./experiments +ignore-words-list=shft diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..150c94cc --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,9 @@ +name: codespell +on: [pull_request, workflow_dispatch] + +jobs: + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: codespell-project/actions-codespell@v1.0 diff --git a/include/bmat8.hpp b/include/bmat8.hpp index 95ebce2f..b3b107cd 100644 --- a/include/bmat8.hpp +++ b/include/bmat8.hpp @@ -80,7 +80,7 @@ class BMat8 { //! A constructor. //! - //! This is the copy assignement constructor. + //! This is the copy assignment constructor. BMat8 &operator=(BMat8 const &) = default; //! A constructor. @@ -161,7 +161,7 @@ class BMat8 { //! Returns the matrix product of \c this and the transpose of \p that //! //! This method returns the standard matrix product (over the - //! boolean semiring) of two BMat8 objects. This is faster than tranposing + //! boolean semiring) of two BMat8 objects. This is faster than transposing //! that and calling the product of \c this with it. Implementation uses //! vector instructions. BMat8 mult_transpose(BMat8 const &that) const; @@ -176,14 +176,14 @@ class BMat8 { //! Returns a canonical basis of the row space of \c this //! - //! Any two matrix with the same row space are garanteed to have the same + //! Any two matrix with the same row space are guaranteed to have the same //! row space basis. This is a fast implementation using vector //! instructions to compute in parallel the union of the other rows //! included in a given one. BMat8 row_space_basis() const; //! Returns a canonical basis of the col space of \c this //! - //! Any two matrix with the same column row space are garanteed to have + //! Any two matrix with the same column row space are guaranteed to have //! the same column space basis. Uses #row_space_basis and #transpose. BMat8 col_space_basis() const { return transpose().row_space_basis().transpose(); diff --git a/include/epu.hpp b/include/epu.hpp index 8e9fb289..a9f5433d 100644 --- a/include/epu.hpp +++ b/include/epu.hpp @@ -118,14 +118,14 @@ constexpr epu8 popcount4 = Epu8([](uint8_t i) { /** Cast a #HPCombi::epu8 to a c++ \c std::array * - * This is usually faster for algorithm using a lot of indexed acces. + * This is usually faster for algorithm using a lot of indexed access. */ inline decltype(Epu8)::array &as_array(epu8 &v) { return reinterpret_cast(v); } /** Cast a constant #HPCombi::epu8 to a C++ \c std::array * - * This is usually faster for algorithm using a lot of indexed acces. + * This is usually faster for algorithm using a lot of indexed access. */ inline const decltype(Epu8)::array &as_array(const epu8 &v) { return reinterpret_cast(v); @@ -140,7 +140,7 @@ inline epu8 from_array(decltype(Epu8)::array a) { /** Cast a #HPCombi::epu8 to a c++ #HPCombi::VectGeneric * - * This is usually faster for algorithm using a lot of indexed acces. + * This is usually faster for algorithm using a lot of indexed access. */ inline VectGeneric<16> &as_VectGeneric(epu8 &v) { return reinterpret_cast &>(as_array(v)); @@ -148,7 +148,7 @@ inline VectGeneric<16> &as_VectGeneric(epu8 &v) { /** Cast a #HPCombi::epu8 to a c++ #HPCombi::VectGeneric * - * This is usually faster for algorithm using a lot of indexed acces. + * This is usually faster for algorithm using a lot of indexed access. */ inline const VectGeneric<16> &as_VectGeneric(const epu8 &v) { return reinterpret_cast &>(as_array(v)); @@ -239,7 +239,7 @@ inline epu8 permutation_of_cmpestrm(epu8 a, epu8 b); */ inline epu8 permutation_of_ref(epu8 a, epu8 b); /** @copydoc common_permutation_of - @par Algorithm: architecture dependant + @par Algorithm: architecture dependent */ inline epu8 permutation_of(epu8 a, epu8 b); @@ -259,7 +259,7 @@ inline epu8 random_epu8(uint16_t bnd); * @details * @param a: supposed to be sorted * @param repl: the value replacing the duplicate entries (default to 0) - * @return the vector \c a where repeated occurences of entries are replaced + * @return the vector \c a where repeated occurrences of entries are replaced * by \c repl */ inline epu8 remove_dups(epu8 a, uint8_t repl = 0); @@ -288,12 +288,12 @@ inline uint8_t horiz_sum_ref(epu8); inline uint8_t horiz_sum_gen(epu8); /** @copydoc common_horiz_sum * @par Algorithm: - * 4-stages paralell algorithm + * 4-stages parallel algorithm */ inline uint8_t horiz_sum4(epu8); /** @copydoc common_horiz_sum * @par Algorithm: - * 3-stages paralell algorithm + indexed access + * 3-stages parallel algorithm + indexed access */ inline uint8_t horiz_sum3(epu8); /** @copydoc common_horiz_sum */ @@ -322,7 +322,7 @@ inline epu8 partial_sums_ref(epu8); inline epu8 partial_sums_gen(epu8); /** @copydoc common_partial_sums * @par Algorithm: - * 4-stages paralell algorithm + * 4-stages parallel algorithm */ inline epu8 partial_sums_round(epu8); /** @copydoc common_partial_sums */ @@ -351,12 +351,12 @@ inline uint8_t horiz_max_ref(epu8); inline uint8_t horiz_max_gen(epu8); /** @copydoc common_horiz_max * @par Algorithm: - * 4-stages paralell algorithm + * 4-stages parallel algorithm */ inline uint8_t horiz_max4(epu8); /** @copydoc common_horiz_max * @par Algorithm: - * 3-stages paralell algorithm + indexed access + * 3-stages parallel algorithm + indexed access */ inline uint8_t horiz_max3(epu8); /** @copydoc common_horiz_max */ @@ -385,7 +385,7 @@ inline epu8 partial_max_ref(epu8); inline epu8 partial_max_gen(epu8); /** @copydoc common_partial_max * @par Algorithm: - * 4-stages paralell algorithm + * 4-stages parallel algorithm */ inline epu8 partial_max_round(epu8); /** @copydoc common_partial_max */ @@ -414,12 +414,12 @@ inline uint8_t horiz_min_ref(epu8); inline uint8_t horiz_min_gen(epu8); /** @copydoc common_horiz_min * @par Algorithm: - * 4-stages paralell algorithm + * 4-stages parallel algorithm */ inline uint8_t horiz_min4(epu8); /** @copydoc common_horiz_min * @par Algorithm: - * 3-stages paralell algorithm + indexed access + * 3-stages parallel algorithm + indexed access */ inline uint8_t horiz_min3(epu8); /** @copydoc common_horiz_min */ @@ -448,7 +448,7 @@ inline epu8 partial_min_ref(epu8); inline epu8 partial_min_gen(epu8); /** @copydoc common_partial_min * @par Algorithm: - * 4-stages paralell algorithm + * 4-stages parallel algorithm */ inline epu8 partial_min_round(epu8); /** @copydoc common_partial_min */ @@ -607,11 +607,11 @@ inline epu8 popcount16(epu8 v); * @param k the size of \c *this (default 16) * * Points where the function is undefined are mapped to \c 0xff. If \c *this - * is a tranformation of @f$0\dots n-1@f$ for @f$n<16@f$, it should be completed - * to a transformation of @f$0\dots 15@f$ by adding fixed points. That is the - * values @f$i\geq n@f$ should be mapped to themself. + * is a transformation of @f$0\dots n-1@f$ for @f$n<16@f$, it should be + * completed to a transformation of @f$0\dots 15@f$ by adding fixed points. That + * is the values @f$i\geq n@f$ should be mapped to themself. * @par Example: - * The partial tranformation + * The partial transformation * @f$\begin{matrix}0 1 2 3 4 5\\ 2 0 5 . . 4 \end{matrix}@f$ * is encoded by the array {2,0,5,0xff,0xff,4,6,7,8,9,10,11,12,13,14,15} */ @@ -623,12 +623,12 @@ inline bool is_partial_transformation(epu8 v, const size_t k = 16); * @param v the vector to test * @param k the size of \c *this (default 16) * - * If \c *this is a tranformation of @f$0\dots n-1@f$ for @f$n<16@f$, + * If \c *this is a transformation of @f$0\dots n-1@f$ for @f$n<16@f$, * it should be completed to a transformation of @f$0\dots 15@f$ * by adding fixed points. That is the values @f$i\geq n@f$ should be * mapped to themself. * @par Example: - * The tranformation + * The transformation * @f$\begin{matrix}0 1 2 3 4 5\\ 2 0 5 2 1 4 \end{matrix}@f$ * is encoded by the array {2,0,5,2,1,4,6,7,8,9,10,11,12,13,14,15} */ @@ -678,7 +678,7 @@ inline bool is_permutation_cpmestri(epu8 v, const size_t k = 16); */ inline bool is_permutation_sort(epu8 v, const size_t k = 16); /** @copydoc common_is_permutation - @par Algorithm: architecture dependant + @par Algorithm: architecture dependent */ inline bool is_permutation(epu8 v, const size_t k = 16); diff --git a/include/epu_impl.hpp b/include/epu_impl.hpp index 136915c6..55996c0f 100644 --- a/include/epu_impl.hpp +++ b/include/epu_impl.hpp @@ -522,7 +522,7 @@ template <> struct hash { }; template <> struct less { - // WARNING: due to endianess this is not lexicographic comparison, + // WARNING: due to endianness this is not lexicographic comparison, // but we don't care when using in std::set. // 10% faster than calling the lexicographic comparison operator ! inline size_t operator()(const HPCombi::epu8 &v1, diff --git a/include/power.hpp b/include/power.hpp index 71edd425..28309e0f 100644 --- a/include/power.hpp +++ b/include/power.hpp @@ -91,7 +91,7 @@ namespace power_helper { * - T #one() : the unit of the monoid * - T #prod(T, T) : the product of two elements in the monoid * - * By default for any type \c T, #one is constructed from the litteral 1 and + * By default for any type \c T, #one is constructed from the literal 1 and * #prod calls the operator *. One can change these default by specializing * the template for some specific type \c T. */