Namespaces | |
detail | |
Functions | |
template<class Cont , class InputIt > | |
void | unpackCopy (Cont &container, InputIt &input_iterator) |
Like std::copy, but passes the input iterator by reference. More... | |
template<typename BufferType , typename BufferIter , typename ValueType > | |
void | reinterpretPackCopy (const std::vector< ValueType > &values, BufferIter &out) |
Packs the data in values into the iterator out and minimizes memory storage in said iterator. More... | |
template<typename BufferType , typename BufferIter , typename ValueType > | |
void | reinterpretUnpackCopy (std::vector< ValueType > &values, BufferIter &in) |
Packs the data from in into the vector values . More... | |
template<typename ValueType , typename BufferType > | |
std::size_t | reinterpretCopySize (const std::size_t input_size) |
Gets the minimum number of values of BufferType needed to represent input_size values of ValueType. More... | |
template<typename BufferType , typename BufferIter , typename... ValueTypes> | |
void | mixedUnpack (BufferIter &in, ValueTypes &... values) |
Unpacks the mixed-values from in into values that were packed with mixedPack(). More... | |
template<typename BufferType , typename BufferIter , typename... ValueTypes> | |
void | mixedPack (BufferIter &out, ValueTypes const &... values) |
Packs the mixed-type values in values into out to be unpacked with mixedUnpack(). More... | |
template<typename BufferType , typename... InputTypes> | |
constexpr std::size_t | mixedPackSize () |
Gets the number of BufferType required to store the expanded InputTypes for use with mixedPack() and mixedUnpack(). More... | |
template<typename BufferType , typename ValueType > | |
BufferType | pack (const ValueType value) |
Packs value into a value of type BufferType at a byte level, to be unpacked with the unpack() routines in this namespace. More... | |
template<typename BufferType , typename ValueType > | |
void | unpack (const BufferType value_as_buffer_type, ValueType &value) |
Unpacks value_as_buffer_type (which is packed with pack()) into value at a byte level. More... | |
template<typename BufferType > | |
BufferType | pack (const Elem *elem, MeshBase *mesh_base=nullptr) |
Packs the ID of elem into a type of BufferType to be unpacked later into another const Elem * with unpack(). More... | |
template<typename BufferType > | |
void | unpack (const Elem *&elem, const BufferType id_as_buffer_type, MeshBase *mesh_base) |
Unpacks the const Elem * from id_as_buffer_type (packed using pack()) into elem . More... | |
template<typename BufferType > | |
BufferType | pack (const Elem *elem, MeshBase *libmesh_dbg_var(mesh_base)) |
void RayTracingPackingUtils::mixedPack | ( | BufferIter & | out, |
ValueTypes const &... | values | ||
) |
Packs the mixed-type values in values
into out
to be unpacked with mixedUnpack().
Uses as few entries in out
needed to represent values
in order.
Definition at line 261 of file RayTracingPackingUtils.h.
constexpr std::size_t RayTracingPackingUtils::mixedPackSize | ( | ) |
Gets the number of BufferType required to store the expanded InputTypes for use with mixedPack() and mixedUnpack().
Can be stored as constexpr to evaluate the size at compile time only.
Definition at line 278 of file RayTracingPackingUtils.h.
void RayTracingPackingUtils::mixedUnpack | ( | BufferIter & | in, |
ValueTypes &... | values | ||
) |
Unpacks the mixed-values from in
into values
that were packed with mixedPack().
Definition at line 247 of file RayTracingPackingUtils.h.
BufferType RayTracingPackingUtils::pack | ( | const ValueType | value | ) |
Packs value
into a value of type BufferType at a byte level, to be unpacked with the unpack() routines in this namespace.
Definition at line 286 of file RayTracingPackingUtils.h.
BufferType RayTracingPackingUtils::pack | ( | const Elem * | elem, |
MeshBase * | mesh_base = nullptr |
||
) |
Packs the ID of elem
into a type of BufferType to be unpacked later into another const Elem * with unpack().
BufferType RayTracingPackingUtils::pack | ( | const Elem * | elem, |
MeshBase * | libmesh_dbg_varmesh_base | ||
) |
Definition at line 305 of file RayTracingPackingUtils.h.
std::size_t RayTracingPackingUtils::reinterpretCopySize | ( | const std::size_t | input_size | ) |
Gets the minimum number of values of BufferType needed to represent input_size
values of ValueType.
To be used with sizing for reinterpretPackCopy() and reinterpretUnpackCopy().
Definition at line 239 of file RayTracingPackingUtils.h.
void RayTracingPackingUtils::reinterpretPackCopy | ( | const std::vector< ValueType > & | values, |
BufferIter & | out | ||
) |
Packs the data in values
into the iterator out
and minimizes memory storage in said iterator.
In specific, ValueType is packed into BufferType at a byte level. That is, if sizeof(ValueType) == 4 and sizeof(BufferType) == 8, two values of type ValueType objects will be stored in a single value of type BufferType.
Definition at line 190 of file RayTracingPackingUtils.h.
void RayTracingPackingUtils::reinterpretUnpackCopy | ( | std::vector< ValueType > & | values, |
BufferIter & | in | ||
) |
Packs the data from in
into the vector values
.
values
MUST be resized ahead of time in order to know how much to advance in
.
This is to be used in the unpacking of values stored by reinterpretPackCopy().
Definition at line 216 of file RayTracingPackingUtils.h.
void RayTracingPackingUtils::unpack | ( | const BufferType | value_as_buffer_type, |
ValueType & | value | ||
) |
Unpacks value_as_buffer_type
(which is packed with pack()) into value
at a byte level.
Definition at line 297 of file RayTracingPackingUtils.h.
Referenced by libMesh::Parallel::Packing< ViewFactorRayStudy::StartElem >::unpack(), and libMesh::Parallel::Packing< std::shared_ptr< Ray > >::unpack().
void RayTracingPackingUtils::unpack | ( | const Elem *& | elem, |
const BufferType | id_as_buffer_type, | ||
MeshBase * | mesh_base | ||
) |
Unpacks the const Elem * from id_as_buffer_type
(packed using pack()) into elem
.
Definition at line 316 of file RayTracingPackingUtils.h.
void RayTracingPackingUtils::unpackCopy | ( | Cont & | container, |
InputIt & | input_iterator | ||
) |
Like std::copy, but passes the input iterator by reference.
Definition at line 181 of file RayTracingPackingUtils.h.
Referenced by libMesh::Parallel::Packing< std::shared_ptr< Ray > >::unpack().