Skip to content

Commit

Permalink
doc: misc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Baptiste Rouquier committed Dec 16, 2024
1 parent 763562a commit ab775a9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/hpcombi/epu8.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ operator"" _u8(unsigned long long arg) noexcept { // NOLINT
epu8 stands for *Extended Packed Unsigned, grouped by 8 bits*;
this is the low level type chosen by Intel for their API to intrinsics,
ie a SIMD vector of 16 unsigned bytes (16×8 = 128bits).
Functions using this type uses semantically equivalent types,
Functions using this type use semantically equivalent types,
eg a _m128 which is 2 vect of 64bits.
a flag tells the compiler to silently consider those types equivalent.
*/
Expand Down
3 changes: 2 additions & 1 deletion include/hpcombi/hpcombi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,6 @@ Data structure should preserve locality. You might want to compute some stats on
This lib is implemented with speed in mind, not code safety.
Eg. there are no checks when building a permutation, which could be invalid (like non injective).
We now suggest to have a look, in the menus above, at Classes → [Class list](annotated.html).
We now suggest to have a look, in the menus above, at Classes → [Class list](annotated.html),
esp. at classes are HPCombi::Perm16 and HPCombi::BMat8.
*/
15 changes: 12 additions & 3 deletions include/hpcombi/perm16.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ struct PPerm16 : public PTransf16 {
* @verbatim {0,0xFF,2,1,3,5,6,0xFF,8,9,0xFF,10,12,0xFF,0xFF,0xFF}
* @endverbatim
*/

/** @copydoc common_inverse_pperm
* @par Algorithm:
* @f$O(n)@f$ algorithm using reference cast to arrays
Expand Down Expand Up @@ -253,42 +254,50 @@ struct Perm16 : public Transf16 /* public PPerm : diamond problem */ {
* Returns
* @verbatim {0,4,2,1,3,5,6,7,8,9,10,11,12,13,14,15} @endverbatim
*/

/** @copydoc common_inverse
* @par Algorithm:
* Reference @f$O(n)@f$ algorithm using loop and indexed access
*/
Perm16 inverse_ref() const;

/** @copydoc common_inverse
* @par Algorithm:
* @f$O(n)@f$ algorithm using reference cast to arrays
*/
Perm16 inverse_arr() const;

/** @copydoc common_inverse
* @par Algorithm:
* Insert the identity in the least significant bits and sort using a
* sorting network. The number of round of the optimal sorting network is
* sorting network. The number of rounds of the optimal sorting network is
* open as far as I know, therefore the complexity is unknown.
*/
Perm16 inverse_sort() const;

/** @copydoc common_inverse
* @par Algorithm:
* @f$O(\log n)@f$ algorithm using some kind of vectorized dichotomic
* search.
*/
Perm16 inverse_find() const { return permutation_of(v, one()); }

/** @copydoc common_inverse
* @par Algorithm:
*
* Raise \e *this to power @f$\text{LCM}(1, 2, ..., n) - 1@f$ so complexity
* is in @f$O(log (\text{LCM}(1, 2, ..., n) - 1)) = O(n)@f$
* Use HPCombi::pow to
* raise \e *this to power @f$\text{LCM}(1, 2, ..., n) - 1@f$ so complexity
* is @f$O(log (\text{LCM}(1, 2, ..., n) - 1)) = O(n)@f$
*/
Perm16 inverse_pow() const;

/** @copydoc common_inverse
* @par Algorithm:
* Compute power from @f$n/2@f$ to @f$n@f$, when @f$\sigma^k(i)=i@f$ then
* @f$\sigma^{-1}(i)=\sigma^{k-1}(i)@f$. Complexity @f$O(n)@f$
*/
Perm16 inverse_cycl() const;

/** @copydoc common_inverse
*
* Frontend method: currently aliased to #inverse_cycl */
Expand Down

0 comments on commit ab775a9

Please sign in to comment.