Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Oct 29, 2023
1 parent b9375fd commit 50abc5f
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = ./include/simde,./.git,./benchmark/python,./experiments
ignore-words-list=shft
9 changes: 9 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
8 changes: 4 additions & 4 deletions include/bmat8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand All @@ -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();
Expand Down
44 changes: 22 additions & 22 deletions include/epu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<decltype(Epu8)::array &>(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<const decltype(Epu8)::array &>(v);
Expand All @@ -140,15 +140,15 @@ 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<VectGeneric<16> &>(as_array(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<const VectGeneric<16> &>(as_array(v));
Expand Down Expand Up @@ -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);

Expand All @@ -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);
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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}
*/
Expand All @@ -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}
*/
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion include/epu_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ template <> struct hash<HPCombi::epu8> {
};

template <> struct less<HPCombi::epu8> {
// 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,
Expand Down
2 changes: 1 addition & 1 deletion include/power.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down

0 comments on commit 50abc5f

Please sign in to comment.