Skip to content

Commit

Permalink
Documentations
Browse files Browse the repository at this point in the history
  • Loading branch information
smarchini committed Oct 14, 2019
1 parent 5024300 commit 935f9a0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ LOOKUP_CACHE_SIZE = 0
# normally produced when WARNINGS is set to YES.
# The default value is: NO.

EXTRACT_ALL = NO
EXTRACT_ALL = YES

# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
Expand Down
2 changes: 2 additions & 0 deletions sux/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ using std::uint8_t;
* [1] https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Common-Type-Attributes.html
*
*/
///@{
using auint64_t = std::uint64_t __attribute__((__may_alias__));
using auint32_t = std::uint32_t __attribute__((__may_alias__));
using auint16_t = std::uint16_t __attribute__((__may_alias__));
using auint8_t = std::uint8_t __attribute__((__may_alias__));
///@}

// Bitmask array used in fenwick::ByteL and fenwick::ByteF
static constexpr uint64_t BYTE_MASK[] = {0x0ULL, 0xFFULL, 0xFFFFULL, 0xFFFFFFULL, 0xFFFFFFFFULL, 0xFFFFFFFFFFULL, 0xFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFFULL};
Expand Down
1 change: 0 additions & 1 deletion sux/dynamic/Vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
namespace sux {

/** Possible types of memory paging. */

enum PageType { TRANSHUGE, SMALLPAGE, HUGETLBPAGE };

/** An expandable DArray with settable type of memory paging.
Expand Down
13 changes: 8 additions & 5 deletions sux/dynamic/rankselect/Stride.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@

namespace sux::ranking {

/**
* Stride - Linear search on many words.
* @param bitvector a bitvector of 64-bit words.
* @param size the length (in words) of the bitvector.
* @tparam T underlining Fenwick tree with an ungiven <size_t> bound.
/** Ranking and selection through a fenwick tree and linear searches over many words.
* @tparam T: Underlining Fenwick tree with an ungiven <size_t> bound.
* @tparam WORDS length (in words) of the linear search stride.
*
*/
Expand All @@ -40,6 +37,12 @@ template <template <size_t> class T, size_t WORDS> class Stride : public RankSel
DArray<uint64_t> Vector;

public:

/** Create a new instance with given vector ov values
* @bitvector: A bitvector of 64-bit words.
* @size: The length (in bits) of the bitvector.
*
*/
Stride(uint64_t bitvector[], size_t size)
: Size(size), Fenwick(buildFenwick(bitvector, divRoundup(size, 64))), Vector(DArray<uint64_t>(divRoundup(size, 64))) {
std::copy_n(bitvector, divRoundup(size, 64), Vector.get());
Expand Down
13 changes: 8 additions & 5 deletions sux/dynamic/rankselect/Word.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@

namespace sux::ranking {

/**
* Word - Linear search on a single word.
* @bitvector: A bitvector of 64-bit words.
* @size: The length (in words) of the bitvector.
* @T: Underlining Fenwick tree with an ungiven <size_t> bound.
/** Ranking and selection through a fenwick tree and linear searches on a single word.
* @tparam T: Underlining Fenwick tree with an ungiven <size_t> bound.
*
*/
template <template <size_t> class T> class Word : public RankSelect {
Expand All @@ -39,6 +36,12 @@ template <template <size_t> class T> class Word : public RankSelect {
DArray<uint64_t> Vector;

public:

/** Create a new instance with given vector ov values
* @bitvector: A bitvector of 64-bit words.
* @size: The length (in bits) of the bitvector.
*
*/
Word(uint64_t bitvector[], size_t size) : Size(size), Fenwick(buildFenwick(bitvector, divRoundup(size, BOUNDSIZE))), Vector(DArray<uint64_t>(divRoundup(size, BOUNDSIZE))) {
std::copy_n(bitvector, divRoundup(size, BOUNDSIZE), Vector.get());
}
Expand Down

0 comments on commit 935f9a0

Please sign in to comment.