Cuda battery library
Loading...
Searching...
No Matches
battery::dynamic_bitset< Mem, Allocator, T > Class Template Reference

#include <dynamic_bitset.hpp>

Public Types

using memory_type = Mem
 
using allocator_type = Allocator
 

Public Member Functions

CUDA dynamic_bitset (const allocator_type &alloc=allocator_type())
 
CUDA dynamic_bitset (size_t at_least_num_bits, const allocator_type &alloc=allocator_type())
 
CUDA dynamic_bitset (const char *bit_str, const allocator_type &alloc=allocator_type())
 
CUDA dynamic_bitset (size_t start, size_t end, const allocator_type &alloc=allocator_type())
 
template<class Mem2 , class Alloc2 >
CUDA dynamic_bitset (const dynamic_bitset< Mem2, Alloc2, T > &other, const allocator_type &alloc=allocator_type())
 
CUDA dynamic_bitset (const this_type &from)
 
 dynamic_bitset (this_type &&)=default
 
CUDA this_typeoperator= (this_type &&other)
 
CUDA allocator_type get_allocator () const
 
CUDA constexpr void swap (this_type &other)
 
CUDA constexpr bool test (size_t pos) const
 
CUDA constexpr bool all () const
 
CUDA constexpr bool any () const
 
CUDA constexpr bool none () const
 
CUDA constexpr size_t size () const
 
CUDA void resize (size_t at_least_num_bits)
 
CUDA constexpr size_t count () const
 
CUDA constexpr dynamic_bitsetset ()
 
CUDA constexpr dynamic_bitsetset (size_t pos)
 
CUDA constexpr dynamic_bitsetset (size_t pos, bool value)
 
CUDA constexpr dynamic_bitsetreset ()
 
CUDA constexpr dynamic_bitsetreset (size_t pos)
 
CUDA constexpr dynamic_bitsetflip ()
 
CUDA constexpr dynamic_bitsetflip (size_t pos)
 
template<class Mem2 , class Alloc2 >
CUDA constexpr bool is_subset_of (const dynamic_bitset< Mem2, Alloc2, T > &other) const
 
template<class Mem2 , class Alloc2 >
CUDA constexpr bool is_proper_subset_of (const dynamic_bitset< Mem2, Alloc2, T > &other) const
 
CUDA constexpr dynamic_bitset operator~ () const
 
template<class Mem2 , class Alloc2 >
CUDA constexpr bool operator== (const dynamic_bitset< Mem2, Alloc2, T > &other) const
 
CUDA constexpr void print () const
 
template<class Alloc2 >
CUDA string< Alloc2 > to_string (Alloc2 allocator=Alloc2()) const
 

Friends

template<class Mem2 , class Allocator2 , class T2 >
class dynamic_bitset
 

Detailed Description

template<class Mem, class Allocator = standard_allocator, class T = unsigned long long>
class battery::dynamic_bitset< Mem, Allocator, T >
Template Parameters
`Mem`is a memory consistency, for instance local_memory, see memory.hpp.
`T`is the underlying type defining the blocks of the bitset.

Member Typedef Documentation

◆ memory_type

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
using battery::dynamic_bitset< Mem, Allocator, T >::memory_type = Mem

◆ allocator_type

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
using battery::dynamic_bitset< Mem, Allocator, T >::allocator_type = Allocator

Constructor & Destructor Documentation

◆ dynamic_bitset() [1/7]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA battery::dynamic_bitset< Mem, Allocator, T >::dynamic_bitset ( const allocator_type & alloc = allocator_type())
inline

◆ dynamic_bitset() [2/7]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA battery::dynamic_bitset< Mem, Allocator, T >::dynamic_bitset ( size_t at_least_num_bits,
const allocator_type & alloc = allocator_type() )
inline

Create a bitset with a size of at least num_bits.

◆ dynamic_bitset() [3/7]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA battery::dynamic_bitset< Mem, Allocator, T >::dynamic_bitset ( const char * bit_str,
const allocator_type & alloc = allocator_type() )
inline

◆ dynamic_bitset() [4/7]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA battery::dynamic_bitset< Mem, Allocator, T >::dynamic_bitset ( size_t start,
size_t end,
const allocator_type & alloc = allocator_type() )
inline

Set all bits in the range [start..end] to 1 and create a bitset with at least end+1 bits. end >= start.

◆ dynamic_bitset() [5/7]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
template<class Mem2 , class Alloc2 >
CUDA battery::dynamic_bitset< Mem, Allocator, T >::dynamic_bitset ( const dynamic_bitset< Mem2, Alloc2, T > & other,
const allocator_type & alloc = allocator_type() )
inline

◆ dynamic_bitset() [6/7]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA battery::dynamic_bitset< Mem, Allocator, T >::dynamic_bitset ( const this_type & from)
inline

◆ dynamic_bitset() [7/7]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
battery::dynamic_bitset< Mem, Allocator, T >::dynamic_bitset ( this_type && )
default

Member Function Documentation

◆ operator=()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA this_type & battery::dynamic_bitset< Mem, Allocator, T >::operator= ( this_type && other)
inline

◆ get_allocator()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA allocator_type battery::dynamic_bitset< Mem, Allocator, T >::get_allocator ( ) const
inline

◆ swap()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr void battery::dynamic_bitset< Mem, Allocator, T >::swap ( this_type & other)
inlineconstexpr

◆ test()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr bool battery::dynamic_bitset< Mem, Allocator, T >::test ( size_t pos) const
inlineconstexpr

◆ all()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr bool battery::dynamic_bitset< Mem, Allocator, T >::all ( ) const
inlineconstexpr

◆ any()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr bool battery::dynamic_bitset< Mem, Allocator, T >::any ( ) const
inlineconstexpr

◆ none()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr bool battery::dynamic_bitset< Mem, Allocator, T >::none ( ) const
inlineconstexpr

◆ size()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr size_t battery::dynamic_bitset< Mem, Allocator, T >::size ( ) const
inlineconstexpr

◆ resize()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA void battery::dynamic_bitset< Mem, Allocator, T >::resize ( size_t at_least_num_bits)
inline

◆ count()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr size_t battery::dynamic_bitset< Mem, Allocator, T >::count ( ) const
inlineconstexpr

◆ set() [1/3]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr dynamic_bitset & battery::dynamic_bitset< Mem, Allocator, T >::set ( )
inlineconstexpr

◆ set() [2/3]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr dynamic_bitset & battery::dynamic_bitset< Mem, Allocator, T >::set ( size_t pos)
inlineconstexpr

◆ set() [3/3]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr dynamic_bitset & battery::dynamic_bitset< Mem, Allocator, T >::set ( size_t pos,
bool value )
inlineconstexpr

◆ reset() [1/2]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr dynamic_bitset & battery::dynamic_bitset< Mem, Allocator, T >::reset ( )
inlineconstexpr

◆ reset() [2/2]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr dynamic_bitset & battery::dynamic_bitset< Mem, Allocator, T >::reset ( size_t pos)
inlineconstexpr

◆ flip() [1/2]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr dynamic_bitset & battery::dynamic_bitset< Mem, Allocator, T >::flip ( )
inlineconstexpr

◆ flip() [2/2]

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr dynamic_bitset & battery::dynamic_bitset< Mem, Allocator, T >::flip ( size_t pos)
inlineconstexpr

◆ is_subset_of()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
template<class Mem2 , class Alloc2 >
CUDA constexpr bool battery::dynamic_bitset< Mem, Allocator, T >::is_subset_of ( const dynamic_bitset< Mem2, Alloc2, T > & other) const
inlineconstexpr

◆ is_proper_subset_of()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
template<class Mem2 , class Alloc2 >
CUDA constexpr bool battery::dynamic_bitset< Mem, Allocator, T >::is_proper_subset_of ( const dynamic_bitset< Mem2, Alloc2, T > & other) const
inlineconstexpr

◆ operator~()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr dynamic_bitset battery::dynamic_bitset< Mem, Allocator, T >::operator~ ( ) const
inlineconstexpr

◆ operator==()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
template<class Mem2 , class Alloc2 >
CUDA constexpr bool battery::dynamic_bitset< Mem, Allocator, T >::operator== ( const dynamic_bitset< Mem2, Alloc2, T > & other) const
inlineconstexpr

◆ print()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
CUDA constexpr void battery::dynamic_bitset< Mem, Allocator, T >::print ( ) const
inlineconstexpr

◆ to_string()

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
template<class Alloc2 >
CUDA string< Alloc2 > battery::dynamic_bitset< Mem, Allocator, T >::to_string ( Alloc2 allocator = Alloc2()) const
inline

Friends And Related Symbol Documentation

◆ dynamic_bitset

template<class Mem , class Allocator = standard_allocator, class T = unsigned long long>
template<class Mem2 , class Allocator2 , class T2 >
friend class dynamic_bitset
friend

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