Cuda battery library
Loading...
Searching...
No Matches
dynamic_bitset.hpp File Reference
#include <cstdio>
#include <cassert>
#include "utility.hpp"
#include "string.hpp"
#include "vector.hpp"

Go to the source code of this file.

Classes

class  battery::dynamic_bitset< Mem, Allocator, T >
 

Namespaces

namespace  battery
 

Macros

#define ZERO   (T{0})
 
#define ONES   (~T{0})
 

Functions

template<class Mem , class Alloc , class T >
CUDA constexpr dynamic_bitset< Mem, Alloc, T > battery::operator& (const dynamic_bitset< Mem, Alloc, T > &lhs, const dynamic_bitset< Mem, Alloc, T > &rhs)
 
template<class Mem , class Alloc , class T >
CUDA constexpr dynamic_bitset< Mem, Alloc, T > battery::operator| (const dynamic_bitset< Mem, Alloc, T > &lhs, const dynamic_bitset< Mem, Alloc, T > &rhs)
 
template<class Mem , class Alloc , class T >
CUDA constexpr dynamic_bitset< Mem, Alloc, T > battery::operator^ (const dynamic_bitset< Mem, Alloc, T > &lhs, const dynamic_bitset< Mem, Alloc, T > &rhs)
 

Detailed Description

This class is similar to bitset but the size is specified at runtime in the constructor. For simplicity of implementation, the size is a multiple of sizeof(T); that could be improved in future version if needed.

Macro Definition Documentation

◆ ZERO

#define ZERO   (T{0})

◆ ONES

#define ONES   (~T{0})