Go to the documentation of this file.
101 #include <type_traits>
112 template<
unsigned W
idth>
115 template<
unsigned W
idth>
118 template<
unsigned W
idth>
126 template<
unsigned W
idth>
142 = (std::numeric_limits<block_type>::digits);
164 static constexpr label
num_blocks(label numElem) noexcept
198 "Width must be > 0 and minimum of two items per data block"
239 inline explicit
PackedList(const label numElem);
243 inline
PackedList(const label numElem, const
unsigned int val);
287 inline label
size() const noexcept;
290 inline
bool empty() const noexcept;
293 inline label
capacity() const noexcept;
306 inline
unsigned int get(const label i) const;
311 inline
bool set(const label i,
unsigned int val = ~0u);
316 inline
bool unset(const label i);
323 template<class IntType =
unsigned int>
328 template<class IntType =
unsigned int>
334 template<class IntType =
unsigned int>
341 inline
void fill(const
unsigned int val);
347 inline
bool trim(label minpos=-1);
360 inline
void resize(const label numElem, const
unsigned int val = 0u);
369 inline
void reserve(const label numElem);
402 inline const
unsigned int*
cdata() const noexcept;
405 inline
unsigned int*
data() noexcept;
415 inline std::streamsize
size_bytes() const noexcept;
419 inline std::streamsize
byteSize() const noexcept;
444 inline
unsigned int remove();
448 inline
unsigned int operator[](const label i) const;
452 inline reference
operator[](const label i);
461 inline
void operator=(const
unsigned int val);
485 inline unsigned int get()
const;
488 inline bool set(
unsigned int val);
502 inline void operator=(
const unsigned int val);
505 inline operator unsigned int ()
const;
517 friend Ostream& operator<< <Width>
523 friend Istream&
operator>> <Width>
552 void assign(
const unsigned int val) { this->
fill(val); }
566 template<
unsigned W
idth>
574 template<
unsigned W
idth>
582 template<
unsigned W
idth>
583 inline bool operator==(
const PackedList<Width>& a,
const PackedList<Width>&
b);
586 template<
unsigned W
idth>
587 inline bool operator!=(
const PackedList<Width>& a,
const PackedList<Width>&
b);
static constexpr unsigned element_width
void resize(const label numElem, const unsigned int val=0u)
A class for handling words, derived from Foam::string.
A helper class for outputting values to Ostream.
void reserve(const label numElem)
tmp< GeometricField< Type, fvPatchField, volMesh > > operator&(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
friend Ostream & operator(Ostream &os, const InfoProxy< PackedList< Width >> &info)
unsigned Hasher(const void *data, size_t len, unsigned seed=0)
autoPtr< PackedList< Width > > clone() const
std::streamsize size_bytes() const noexcept
void clear_trailing_bits()
bool empty() const noexcept
void assign(const PackedList< Width > &rhs)
Istream & readList(Istream &is)
Istream & operator>>(Istream &, directionInfo &)
constexpr PackedList() noexcept
unsigned operator()(const PackedList< Width > &obj) const
void checkIndex(const label i) const
void swap(PackedList< Width > &rhs)
unsigned int get(const label i) const
const char * cdata_bytes() const noexcept
static constexpr block_type mask_lower(unsigned elementOffset)
bool operator!=(const eddy &a, const eddy &b)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Ostream & printBits(Ostream &os, bool debugOutput=false) const
static unsigned int repeated_value(unsigned val)
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
List< block_type > block_container
const dimensionedScalar b
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool unset(const label i)
unsigned int const_reference
A range or interval of labels defined by a start and a size.
void fill(const unsigned int val)
const unsigned int * cdata() const noexcept
Ostream & writeList(Ostream &os, const label shortLen=0) const
void setSize(const label n, unsigned int val=0u)
OBJstream os(runTime.globalPath()/outputName)
void transfer(PackedList< Width > &rhs)
PackedList< Width > & append(const unsigned int val)
bool equal(const PackedList< Width > &other) const
void setPair(Istream &is)
List< IntType > unpack() const
void assign(const unsigned int val)
static constexpr block_type max_value
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void writeEntry(Ostream &os) const
static constexpr unsigned elem_per_block
A dynamic list of packed unsigned integers, with the number of bits per item specified by the <Width>...
void operator=(const PackedList< Width > &lst)
label size() const noexcept
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
bool trim(label minpos=-1)
const List< unsigned int > & storage() const
Implementation of template-invariant details for Foam::PackedList.
char * data_bytes() noexcept
bool set(const label i, unsigned int val=~0u)
Base for lists with indirect addressing, templated on the list contents type and the addressing type....
std::streamsize byteSize() const noexcept
void resize_nocopy(const label numElem)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
label capacity() const noexcept
void copyAssign(const PackedList< Width > &rhs)
static constexpr label num_blocks(label numElem) noexcept
static constexpr unsigned bits_per_block
Database for solution data, solver performance and other reduced data.
InfoProxy< PackedList< Width > > info() const
static unsigned int readValue(Istream &is)
void setCapacity(const label numElem)