Low-Level Abstraction of Memory Access
llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral > Struct Template Reference

#include <BitPackedInt.hpp>

+ Inheritance diagram for llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral >:
+ Collaboration diagram for llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral >:

Public Types

using VHBits = typename Base::VHBits
 
using Permuter = PermuteFields< TRecordDim >
 
using Base = MappingBase< TArrayExtents, TRecordDim >
 
using size_type = typename TArrayExtents::value_type
 
- Public Types inherited from llama::mapping::internal::BitPackedIntCommon< TArrayExtents, TRecordDim, typename TArrayExtents::value_type, SignBit::Keep, LinearizeArrayIndexRight, internal::StoredUnsignedFor< TRecordDim > >
using LinearizeArrayIndexFunctor = LinearizeArrayIndexRight
 
using StoredIntegral = internal::StoredUnsignedFor< TRecordDim >
 
- Public Types inherited from llama::mapping::MappingBase< TArrayExtents, TRecordDim >
using ArrayExtents = TArrayExtents
 
using RecordDim = TRecordDim
 

Public Member Functions

constexpr auto blobSize (size_type) const -> size_type
 
template<std::size_t... RecordCoords, typename Blobs >
constexpr auto compute (typename Base::ArrayIndex ai, RecordCoord< RecordCoords... >, Blobs &blobs) const
 
- Public Member Functions inherited from llama::mapping::internal::BitPackedIntCommon< TArrayExtents, TRecordDim, typename TArrayExtents::value_type, SignBit::Keep, LinearizeArrayIndexRight, internal::StoredUnsignedFor< TRecordDim > >
constexpr auto bits () const -> size_type
 
constexpr BitPackedIntCommon (TArrayExtents extents={}, typename TArrayExtents::value_type bits={}, TRecordDim={})
 
constexpr BitPackedIntCommon (TArrayExtents extents, typename TArrayExtents::value_type bits, TRecordDim={})
 
- Public Member Functions inherited from llama::mapping::MappingBase< TArrayExtents, TRecordDim >
constexpr MappingBase ()=default
 
constexpr MappingBase (ArrayExtents extents, RecordDim={})
 
constexpr auto extents () const -> ArrayExtents
 

Static Public Attributes

static constexpr std::size_t blobCount = 1
 

Additional Inherited Members

- Static Public Member Functions inherited from llama::mapping::internal::BitPackedIntCommon< TArrayExtents, TRecordDim, typename TArrayExtents::value_type, SignBit::Keep, LinearizeArrayIndexRight, internal::StoredUnsignedFor< TRecordDim > >
static constexpr auto isComputed (RecordCoord< RecordCoords... >)
 
- Protected Types inherited from llama::mapping::internal::BitPackedIntCommon< TArrayExtents, TRecordDim, typename TArrayExtents::value_type, SignBit::Keep, LinearizeArrayIndexRight, internal::StoredUnsignedFor< TRecordDim > >
using Base = MappingBase< TArrayExtents, TRecordDim >
 
using VHBits = llama::internal::BoxedValue< typename TArrayExtents::value_type >
 
using size_type = typename TArrayExtents::value_type
 
using IsAllowedFieldType = mp_or< std::is_integral< T >, std::is_enum< T > >
 
using IsFieldTypeSmallerOrEqualStorageIntegral = mp_bool< sizeof(T)<=sizeof(StoredIntegral)>
 
- Protected Types inherited from llama::mapping::MappingBase< TArrayExtents, TRecordDim >
using ArrayIndex = typename ArrayExtents::Index
 
using size_type = typename ArrayExtents::value_type
 
- Protected Member Functions inherited from llama::internal::BoxedValue< T, I >
 BoxedValue ()=default
 
 BoxedValue (T value)
 
constexpr auto value () const
 

Detailed Description

template<typename TArrayExtents, typename TRecordDim, typename Bits = typename TArrayExtents::value_type, SignBit SignBit = SignBit::Keep, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder, typename TStoredIntegral = internal::StoredUnsignedFor<TRecordDim>>
struct llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral >

Array of struct mapping using bit packing to reduce size/precision of integral data types. If your record dimension contains non-integral types, split them off using the Split mapping first.

Template Parameters
BitsIf Bits is llama::Constant<N>, the compile-time N specifies the number of bits to use. If Bits is an integral type T, the number of bits is specified at runtime, passed to the constructor and stored as type T. Must not be zero and must not be bigger than the bits of TStoredIntegral.
SignBitWhen set to SignBit::Discard, discards the sign bit when storing signed integers. All numbers will be read back positive.
TLinearizeArrayIndexFunctorDefines how the array dimensions should be mapped into linear numbers and how big the linear domain gets.
PermuteFieldsDefines how the record dimension's fields should be permuted. See \tparam TStoredIntegral Integral type used as storage of reduced precision integers. Must be std::uint32_t or std::uint64_t.

Definition at line 476 of file BitPackedInt.hpp.

Member Typedef Documentation

◆ Base

template<typename TArrayExtents , typename TRecordDim , typename Bits = typename TArrayExtents::value_type, SignBit SignBit = SignBit::Keep, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder, typename TStoredIntegral = internal::StoredUnsignedFor<TRecordDim>>
using llama::mapping::internal::BitPackedIntCommon< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, TStoredIntegral >::Base = MappingBase<TArrayExtents, TRecordDim>

Definition at line 257 of file BitPackedInt.hpp.

◆ Permuter

template<typename TArrayExtents , typename TRecordDim , typename Bits = typename TArrayExtents::value_type, SignBit SignBit = SignBit::Keep, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder, typename TStoredIntegral = internal::StoredUnsignedFor<TRecordDim>>
using llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral >::Permuter = PermuteFields<TRecordDim>

Definition at line 494 of file BitPackedInt.hpp.

◆ size_type

template<typename TArrayExtents , typename TRecordDim , typename Bits = typename TArrayExtents::value_type, SignBit SignBit = SignBit::Keep, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder, typename TStoredIntegral = internal::StoredUnsignedFor<TRecordDim>>
using llama::mapping::internal::BitPackedIntCommon< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, TStoredIntegral >::size_type = typename TArrayExtents::value_type

Definition at line 259 of file BitPackedInt.hpp.

◆ VHBits

template<typename TArrayExtents , typename TRecordDim , typename Bits = typename TArrayExtents::value_type, SignBit SignBit = SignBit::Keep, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder, typename TStoredIntegral = internal::StoredUnsignedFor<TRecordDim>>
using llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral >::VHBits = typename Base::VHBits

Definition at line 492 of file BitPackedInt.hpp.

Member Function Documentation

◆ blobSize()

template<typename TArrayExtents , typename TRecordDim , typename Bits = typename TArrayExtents::value_type, SignBit SignBit = SignBit::Keep, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder, typename TStoredIntegral = internal::StoredUnsignedFor<TRecordDim>>
constexpr auto llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral >::blobSize ( size_type  ) const -> size_type
inlineconstexpr

Definition at line 498 of file BitPackedInt.hpp.

◆ compute()

template<typename TArrayExtents , typename TRecordDim , typename Bits = typename TArrayExtents::value_type, SignBit SignBit = SignBit::Keep, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder, typename TStoredIntegral = internal::StoredUnsignedFor<TRecordDim>>
template<std::size_t... RecordCoords, typename Blobs >
constexpr auto llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral >::compute ( typename Base::ArrayIndex  ai,
RecordCoord< RecordCoords... >  ,
Blobs blobs 
) const
inlineconstexpr

Definition at line 507 of file BitPackedInt.hpp.

Member Data Documentation

◆ blobCount

template<typename TArrayExtents , typename TRecordDim , typename Bits = typename TArrayExtents::value_type, SignBit SignBit = SignBit::Keep, typename TLinearizeArrayIndexFunctor = LinearizeArrayIndexRight, template< typename > typename PermuteFields = PermuteFieldsInOrder, typename TStoredIntegral = internal::StoredUnsignedFor<TRecordDim>>
constexpr std::size_t llama::mapping::BitPackedIntAoS< TArrayExtents, TRecordDim, Bits, SignBit, TLinearizeArrayIndexFunctor, PermuteFields, TStoredIntegral >::blobCount = 1
staticconstexpr

Definition at line 495 of file BitPackedInt.hpp.


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