Low-Level Abstraction of Memory Access
llama::mapping::internal Namespace Reference

Classes

struct  FloatBitTraits
 
struct  FloatBitTraits< float >
 
struct  FloatBitTraits< double >
 
struct  BitPackedFloatRef
 
struct  BitPackedIntRef
 
struct  BitPackedIntCommon
 
struct  ByteswapProjection
 
struct  ChangeTypeProjection
 
struct  MakeProjectionPair
 
struct  S
 
struct  FieldAccessCountReference
 
struct  NullReference
 
struct  UnaryFunctionTraits
 
struct  UnaryFunctionTraits< Ret(*)(Arg)>
 
struct  MakeReplacerProj
 
struct  ProjectionReference
 
struct  PartitionFoldOpImpl
 
struct  ReplaceTagListsByCoords
 
struct  ReplaceTagListsByCoords< RecordDim, RecordCoord< RCs... > >
 
struct  ReplaceTagListsByCoords< RecordDim, mp_list< Args... > >
 

Typedefs

template<typename RecordDim >
using StoredIntegralFor = std::conditional_t< mp_contains< FlatRecordDim< RecordDim >, double >::value, std::uint64_t, std::uint32_t >
 
template<typename A , typename B >
using HasLargerSize = mp_bool< sizeof(A)< sizeof(B)>
 
template<typename RecordDim >
using LargestIntegral = mp_max_element< FlatRecordDim< RecordDim >, HasLargerSize >
 
template<typename RecordDim >
using StoredUnsignedFor = std::conditional_t<(sizeof(LargestIntegral< RecordDim >) > sizeof(std::uint32_t)), std::uint64_t, std::uint32_t >
 
template<typename T >
using ReplaceByByteArray = std::byte[sizeof(T)]
 
template<typename RecordDim >
using SplitBytes = TransformLeaves< RecordDim, ReplaceByByteArray >
 
template<typename T >
using MakeByteswapProjectionPair = mp_list< T, ByteswapProjection< T > >
 
template<typename RecordDim >
using MakeByteswapProjectionMap = mp_transform< MakeByteswapProjectionPair, mp_unique< FlatRecordDim< RecordDim > >>
 
template<typename RecordDim , typename ReplacementMap >
using MakeProjectionMap = mp_transform< MakeProjectionPair< RecordDim >::template fn, ReplacementMap >
 
template<typename A , typename B >
using LessAlignment = std::bool_constant< alignof(A)< alignof(B)>
 
template<typename A , typename B >
using MoreAlignment = std::bool_constant<(alignof(A) > alignof(B))>
 
template<typename ProjectionMap , typename Coord , typename RecordDimType >
using ProjectionOrVoid = typename decltype(projectionOrVoidImpl< ProjectionMap, Coord, RecordDimType >())::type
 
template<typename RecordDim , typename ProjectionMap >
using ReplaceTypesByProjectionResults = TransformLeavesWithCoord< RecordDim, MakeReplacerProj< ProjectionMap >::template fn >
 
template<typename Acc , typename TagList >
using PartitionFoldOp = typename PartitionFoldOpImpl< Acc, TagList >::type
 

Functions

template<typename Integral >
auto repackFloat (Integral inFloat, unsigned inMantissaBits, unsigned inExponentBits, unsigned outMantissaBits, unsigned outExponentBits) -> Integral
 
template<typename E , typename M >
auto integBits (E e, M m)
 
template<auto E, auto M>
auto integBits (llama::internal::BoxedValue< Constant< E >>, llama::internal::BoxedValue< Constant< M >>)
 
template<typename Integral >
constexpr auto makeMask (Integral bits) -> Integral
 
template<bool KeepSignBit, typename Integral , typename StoredIntegral >
constexpr auto bitunpack (const StoredIntegral *ptr, StoredIntegral bitOffset, StoredIntegral bitCount) -> Integral
 
template<bool KeepSignBit, typename StoredIntegral , typename Integral >
constexpr void bitpack (StoredIntegral *ptr, StoredIntegral bitOffset, StoredIntegral bitCount, Integral value)
 
template<typename Integral , typename StoredIntegral >
constexpr auto bitunpack1 (const StoredIntegral *ptr, StoredIntegral bitOffset) -> Integral
 
template<typename StoredIntegral , typename Integral >
constexpr void bitpack1 (StoredIntegral *ptr, StoredIntegral bitOffset, Integral value)
 
template<typename T >
auto byteswap (T t) -> T
 
template<typename CountType >
void atomicInc (CountType &i)
 
template<typename ProjectionMap , typename Coord , typename RecordDimType >
auto projectionOrVoidImpl ()
 
template<typename... Fields, std::size_t FirstCoord, std::size_t... Coords>
auto partitionRecordDim (Record< Fields... >, RecordCoord< FirstCoord, Coords... >)
 
template<typename... Fields, typename... RCs>
auto partitionRecordDim (Record< Fields... >, mp_list< RCs... >)
 

Variables

template<typename RC , typename RecordCoordForMapping1 >
constexpr bool isSelected = recordCoordCommonPrefixIsSame<RecordCoordForMapping1, RC>
 
template<typename RC , typename... RecordCoordsForMapping1>
constexpr bool isSelected< RC, mp_list< RecordCoordsForMapping1... > > = (isSelected<RC, RecordCoordsForMapping1> || ...)
 

Typedef Documentation

◆ HasLargerSize

template<typename A , typename B >
using llama::mapping::internal::HasLargerSize = typedef mp_bool<sizeof(A) < sizeof(B)>

Definition at line 226 of file BitPackedInt.hpp.

◆ LargestIntegral

template<typename RecordDim >
using llama::mapping::internal::LargestIntegral = typedef mp_max_element<FlatRecordDim<RecordDim>, HasLargerSize>

Definition at line 229 of file BitPackedInt.hpp.

◆ LessAlignment

template<typename A , typename B >
using llama::mapping::internal::LessAlignment = typedef std::bool_constant<alignof(A) < alignof(B)>

Definition at line 222 of file Common.hpp.

◆ MakeByteswapProjectionMap

template<typename RecordDim >
using llama::mapping::internal::MakeByteswapProjectionMap = typedef mp_transform<MakeByteswapProjectionPair, mp_unique<FlatRecordDim<RecordDim> >>

Definition at line 57 of file Byteswap.hpp.

◆ MakeByteswapProjectionPair

template<typename T >
using llama::mapping::internal::MakeByteswapProjectionPair = typedef mp_list<T, ByteswapProjection<T> >

Definition at line 54 of file Byteswap.hpp.

◆ MakeProjectionMap

template<typename RecordDim , typename ReplacementMap >
using llama::mapping::internal::MakeProjectionMap = typedef mp_transform<MakeProjectionPair<RecordDim>::template fn, ReplacementMap>

Definition at line 45 of file ChangeType.hpp.

◆ MoreAlignment

template<typename A , typename B >
using llama::mapping::internal::MoreAlignment = typedef std::bool_constant<(alignof(A) > alignof(B))>

Definition at line 225 of file Common.hpp.

◆ PartitionFoldOp

template<typename Acc , typename TagList >
using llama::mapping::internal::PartitionFoldOp = typedef typename PartitionFoldOpImpl<Acc, TagList>::type

Definition at line 47 of file Split.hpp.

◆ ProjectionOrVoid

template<typename ProjectionMap , typename Coord , typename RecordDimType >
using llama::mapping::internal::ProjectionOrVoid = typedef typename decltype(projectionOrVoidImpl<ProjectionMap, Coord, RecordDimType>())::type

Definition at line 39 of file Projection.hpp.

◆ ReplaceByByteArray

template<typename T >
using llama::mapping::internal::ReplaceByByteArray = typedef std::byte[sizeof(T)]

Definition at line 14 of file Bytesplit.hpp.

◆ ReplaceTypesByProjectionResults

template<typename RecordDim , typename ProjectionMap >
using llama::mapping::internal::ReplaceTypesByProjectionResults = typedef TransformLeavesWithCoord<RecordDim, MakeReplacerProj<ProjectionMap>::template fn>

Definition at line 68 of file Projection.hpp.

◆ SplitBytes

template<typename RecordDim >
using llama::mapping::internal::SplitBytes = typedef TransformLeaves<RecordDim, ReplaceByByteArray>

Definition at line 17 of file Bytesplit.hpp.

◆ StoredIntegralFor

template<typename RecordDim >
using llama::mapping::internal::StoredIntegralFor = typedef std::conditional_t<mp_contains<FlatRecordDim<RecordDim>, double>::value, std::uint64_t, std::uint32_t>

Definition at line 181 of file BitPackedFloat.hpp.

◆ StoredUnsignedFor

template<typename RecordDim >
using llama::mapping::internal::StoredUnsignedFor = typedef std:: conditional_t<(sizeof(LargestIntegral<RecordDim>) > sizeof(std::uint32_t)), std::uint64_t, std::uint32_t>

Definition at line 232 of file BitPackedInt.hpp.

Function Documentation

◆ atomicInc()

template<typename CountType >
void llama::mapping::internal::atomicInc ( CountType &  i)
inline

Definition at line 249 of file Common.hpp.

◆ bitpack()

template<bool KeepSignBit, typename StoredIntegral , typename Integral >
constexpr void llama::mapping::internal::bitpack ( StoredIntegral *  ptr,
StoredIntegral  bitOffset,
StoredIntegral  bitCount,
Integral  value 
)
inlineconstexpr

Definition at line 74 of file BitPackedInt.hpp.

◆ bitpack1()

template<typename StoredIntegral , typename Integral >
constexpr void llama::mapping::internal::bitpack1 ( StoredIntegral *  ptr,
StoredIntegral  bitOffset,
Integral  value 
)
inlineconstexpr

Definition at line 139 of file BitPackedInt.hpp.

◆ bitunpack()

template<bool KeepSignBit, typename Integral , typename StoredIntegral >
constexpr auto llama::mapping::internal::bitunpack ( const StoredIntegral *  ptr,
StoredIntegral  bitOffset,
StoredIntegral  bitCount 
) -> Integral
inlineconstexpr

Definition at line 31 of file BitPackedInt.hpp.

◆ bitunpack1()

template<typename Integral , typename StoredIntegral >
constexpr auto llama::mapping::internal::bitunpack1 ( const StoredIntegral *  ptr,
StoredIntegral  bitOffset 
) -> Integral
inlineconstexpr

Definition at line 129 of file BitPackedInt.hpp.

◆ byteswap()

template<typename T >
auto llama::mapping::internal::byteswap ( t) -> T
inline

Definition at line 17 of file Byteswap.hpp.

◆ integBits() [1/2]

template<typename E , typename M >
auto llama::mapping::internal::integBits ( e,
m 
)
inline

Definition at line 86 of file BitPackedFloat.hpp.

◆ integBits() [2/2]

template<auto E, auto M>
auto llama::mapping::internal::integBits ( llama::internal::BoxedValue< Constant< E >>  ,
llama::internal::BoxedValue< Constant< M >>   
)
inline

Definition at line 92 of file BitPackedFloat.hpp.

◆ makeMask()

template<typename Integral >
constexpr auto llama::mapping::internal::makeMask ( Integral  bits) -> Integral
inlineconstexpr

Definition at line 25 of file BitPackedInt.hpp.

◆ partitionRecordDim() [1/2]

template<typename... Fields, typename... RCs>
auto llama::mapping::internal::partitionRecordDim ( Record< Fields... >  ,
mp_list< RCs... >   
)

Definition at line 50 of file Split.hpp.

◆ partitionRecordDim() [2/2]

template<typename... Fields, std::size_t FirstCoord, std::size_t... Coords>
auto llama::mapping::internal::partitionRecordDim ( Record< Fields... >  ,
RecordCoord< FirstCoord, Coords... >   
)

Definition at line 14 of file Split.hpp.

◆ projectionOrVoidImpl()

template<typename ProjectionMap , typename Coord , typename RecordDimType >
auto llama::mapping::internal::projectionOrVoidImpl ( )

Definition at line 28 of file Projection.hpp.

◆ repackFloat()

template<typename Integral >
auto llama::mapping::internal::repackFloat ( Integral  inFloat,
unsigned  inMantissaBits,
unsigned  inExponentBits,
unsigned  outMantissaBits,
unsigned  outExponentBits 
) -> Integral
inline

Definition at line 39 of file BitPackedFloat.hpp.

Variable Documentation

◆ isSelected

template<typename RC , typename RecordCoordForMapping1 >
constexpr bool llama::mapping::internal::isSelected = recordCoordCommonPrefixIsSame<RecordCoordForMapping1, RC>
inlineconstexpr

Definition at line 58 of file Split.hpp.

◆ isSelected< RC, mp_list< RecordCoordsForMapping1... > >

template<typename RC , typename... RecordCoordsForMapping1>
constexpr bool llama::mapping::internal::isSelected< RC, mp_list< RecordCoordsForMapping1... > > = (isSelected<RC, RecordCoordsForMapping1> || ...)
inlineconstexpr

Definition at line 61 of file Split.hpp.