Low-Level Abstraction of Memory Access
View.hpp File Reference
#include "Accessors.hpp"
#include "Array.hpp"
#include "ArrayIndexRange.hpp"
#include "BlobAllocators.hpp"
#include "Concepts.hpp"
#include "Core.hpp"
#include "macros.hpp"
#include "mapping/One.hpp"
#include <type_traits>
+ Include dependency graph for View.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  llama::internal::IsComputed< Mapping, RecordCoord, typename >
 
struct  llama::internal::IsComputed< Mapping, RecordCoord, std::void_t< decltype(Mapping::isComputed(RecordCoord{}))> >
 
struct  llama::Iterator< View >
 
struct  llama::View< TMapping, TBlobType, TAccessor >
 
struct  llama::SubView< TStoredParentView >
 

Namespaces

 llama
 
 llama::internal
 

Typedefs

template<typename Allocator , typename RecordDim >
using llama::internal::AllocatorBlobType = decltype(std::declval< Allocator >()(std::integral_constant< std::size_t, alignOf< RecordDim > >{}, 0))
 
template<typename RecordDim >
using llama::One = RecordRef< decltype(allocScalarView< 0, RecordDim >()), RecordCoord<>, true >
 A RecordRef that owns and holds a single value. More...
 

Functions

template<typename Allocator , typename Mapping , std::size_t... Is>
auto llama::internal::makeBlobArray (const Allocator &alloc, const Mapping &mapping, std::integer_sequence< std::size_t, Is... >) -> Array< AllocatorBlobType< Allocator, typename Mapping::RecordDim >, Mapping::blobCount >
 
template<typename Mapping , typename Allocator = bloballoc::Vector, typename Accessor = accessor::Default>
auto llama::allocViewUninitialized (Mapping mapping={}, const Allocator &alloc={}, Accessor accessor={})
 Same as allocView but does not run field constructors. More...
 
template<typename Mapping , typename BlobType , typename Accessor , std::size_t... RCs>
void llama::constructField (View< Mapping, BlobType, Accessor > &view, typename Mapping::ArrayExtents::Index ai, RecordCoord< RCs... > rc)
 
template<typename Mapping , typename BlobType , typename Accessor >
void llama::constructFields (View< Mapping, BlobType, Accessor > &view)
 
template<typename Mapping , typename Allocator = bloballoc::Vector, typename Accessor = accessor::Default>
auto llama::allocView (Mapping mapping={}, const Allocator &alloc={}, Accessor accessor={}) -> View< Mapping, internal::AllocatorBlobType< Allocator, typename Mapping::RecordDim >, Accessor >
 
template<std::size_t Dim, typename RecordDim >
auto llama::allocScalarViewUninitialized () -> decltype(auto)
 Same as allocScalarView but does not run field constructors. More...
 
template<std::size_t Dim, typename RecordDim >
auto llama::allocScalarView () -> decltype(auto)
 
template<typename Mapping , typename RecordCoord , typename Blobs >
auto llama::mapToMemory (Mapping &mapping, typename Mapping::ArrayExtents::Index ai, RecordCoord rc, Blobs &blobs) -> decltype(auto)
 
template<class T , class U >
constexpr auto && llama::internal::forward_like (U &&x) noexcept
 
template<typename Blobs , typename TransformBlobFunc , std::size_t... Is>
auto llama::internal::makeTransformedBlobArray (Blobs &&blobs, const TransformBlobFunc &transformBlob, std::integer_sequence< std::size_t, Is... >)
 
template<typename ViewFwd , typename TransformBlobFunc , typename = std::enable_if_t<isView<std::decay_t<ViewFwd>>>>
auto llama::transformBlobs (ViewFwd &&view, const TransformBlobFunc &transformBlob)
 
template<typename View , typename NewBlobType = CopyConst<std::remove_reference_t<View>, std::byte>*, typename = std::enable_if_t<isView<std::decay_t<View>>>>
auto llama::shallowCopy (View &&view)
 
template<typename NewAccessor , typename ViewFwd , typename = std::enable_if_t<isView<std::decay_t<ViewFwd>>>>
auto llama::withAccessor (ViewFwd &&view, NewAccessor newAccessor={})
 
template<typename NewMapping , typename ViewFwd , typename = std::enable_if_t<isView<std::decay_t<ViewFwd>>>>
auto llama::withMapping (ViewFwd &&view, NewMapping newMapping={})
 
template<typename TStoredParentView >
 llama::SubView (TStoredParentView &&, typename std::remove_reference_t< TStoredParentView >::Mapping::ArrayExtents::Index) -> SubView< TStoredParentView >
 

Variables

template<typename Mapping , typename RecordCoord >
constexpr bool llama::isComputed = internal::IsComputed<Mapping, RecordCoord>::value
 Returns true if the field accessed via the given mapping and record coordinate is a computed value. More...
 
template<typename Mapping >
constexpr bool llama::hasAnyComputedField
 Returns true if any field accessed via the given mapping is a computed value. More...
 
template<typename T >
constexpr bool llama::isOne = false
 Is true, if T is an instance of One. More...
 
template<typename View , typename BoundRecordCoord >
constexpr bool llama::isOne< RecordRef< View, BoundRecordCoord, true > > = true
 
template<typename View >
constexpr auto llama::isView = false
 
template<typename Mapping , typename BlobType , typename Accessor >
constexpr auto llama::isView< View< Mapping, BlobType, Accessor > > = true