PBeFS
Parallel Best-First Search
Loading...
Searching...
No Matches
Word128 Struct Reference

an unsigned integer of 128 bits, as two words of 64 More...

#include <PBeFS/astar/SlidingTile.h>

Public Member Functions

constexpr Word128 (void) noexcept=default
constexpr Word128 (std::uint64_t l) noexcept
 the integer of value l
constexpr Word128 (std::uint64_t l, std::uint64_t h) noexcept
 the integer of the words l and h
constexpr operator std::uint64_t (void) const noexcept
 the bits 0 to 63
Word128 & operator|= (Word128 b) noexcept

Public Attributes

std::uint64_t lo = 0
 the bits 0 to 63
std::uint64_t hi = 0
 the bits 64 to 127

Friends

constexpr bool operator== (const Word128 &a, const Word128 &b) noexcept=default
constexpr Word128 operator& (Word128 a, Word128 b) noexcept
constexpr Word128 operator| (Word128 a, Word128 b) noexcept
constexpr Word128 operator^ (Word128 a, Word128 b) noexcept
constexpr Word128 operator~ (Word128 a) noexcept
constexpr Word128 operator<< (Word128 a, int n) noexcept
 the shift to the left by n bits, \( 0 \leq n < 128 \)
constexpr Word128 operator>> (Word128 a, int n) noexcept
 the shift to the right by n bits, \( 0 \leq n < 128 \)
constexpr int countr_zero (Word128 a) noexcept
 the number of trailing zero bits, 128 if a is 0

Detailed Description

an unsigned integer of 128 bits, as two words of 64

It has the operations on bits that a packed board needs (and, or, exclusive or, not, the shifts and the count of the trailing zeros), written on two words so that they are the same with every compiler, none of which has to offer an integer of 128 bits; it is trivially copyable, and two of them are equal if their words are.

Constructor & Destructor Documentation

◆ Word128() [1/3]

Word128 ( void )
constexprdefaultnoexcept

◆ Word128() [2/3]

Word128 ( std::uint64_t l)
inlineconstexprnoexcept

the integer of value l

◆ Word128() [3/3]

Word128 ( std::uint64_t l,
std::uint64_t h )
inlineconstexprnoexcept

the integer of the words l and h

Member Function Documentation

◆ operator std::uint64_t()

operator std::uint64_t ( void ) const
inlineexplicitconstexprnoexcept

the bits 0 to 63

◆ operator|=()

Word128 & operator|= ( Word128 b)
inlinenoexcept

◆ countr_zero

int countr_zero ( Word128 a)
friend

the number of trailing zero bits, 128 if a is 0

◆ operator&

Word128 operator& ( Word128 a,
Word128 b )
friend

◆ operator<<

Word128 operator<< ( Word128 a,
int n )
friend

the shift to the left by n bits, \( 0 \leq n < 128 \)

◆ operator==

bool operator== ( const Word128 & a,
const Word128 & b )
friend

◆ operator>>

Word128 operator>> ( Word128 a,
int n )
friend

the shift to the right by n bits, \( 0 \leq n < 128 \)

◆ operator^

Word128 operator^ ( Word128 a,
Word128 b )
friend

◆ operator|

Word128 operator| ( Word128 a,
Word128 b )
friend

◆ operator~

Word128 operator~ ( Word128 a)
friend

Member Data Documentation

◆ hi

std::uint64_t hi = 0

the bits 64 to 127

◆ lo

std::uint64_t lo = 0

the bits 0 to 63


The documentation for this struct was generated from the following file: