Skip to content

StorageView

#include <sbio/core/storage_view.hh>
template<class StorageT, class EPolicy>
class StorageView

Defined in src/lib/sbio/core/storage_view.hh:87

Return Name Description
SBIO_HD StorageView inline
SBIO_HD StorageView inline
SBIO_HD auto size const inline
SBIO_HD auto acquire inline
SBIO_HD void release inline
SBIO_HD void release_written inline Release a view after writing bytes to the start of it.
SBIO_HD auto release inline requires hd_std::is_pointer_v<PtrT>

inline

inline SBIO_HD StorageView(StorageT & storage)

Defined in src/lib/sbio/core/storage_view.hh:90


inline

inline SBIO_HD StorageView(StorageT & storage, hd_std::atomic< hd_std::size_t > & num_views)

Defined in src/lib/sbio/core/storage_view.hh:95


const inline

template<class Role, hd_std::size_t Index = 0> inline SBIO_HD auto size() const

Defined in src/lib/sbio/core/storage_view.hh:102


inline

template<class Role, hd_std::size_t Index = 0, class CallerMemTag> inline SBIO_HD auto acquire(AcquireIntent intent = AcquireIntent::BufferMemorySpace)

Defined in src/lib/sbio/core/storage_view.hh:109


inline

template<class Role, hd_std::size_t Index, class ViewT> inline SBIO_HD void release(ViewT view)

Defined in src/lib/sbio/core/storage_view.hh:124


inline

template<class Role, hd_std::size_t Index, class ViewT> inline SBIO_HD void release_written(ViewT view, hd_std::size_t nbytes)

Defined in src/lib/sbio/core/storage_view.hh:143

Release a view after writing bytes to the start of it.

The EPolicy publishes the written bytes (moves from view to buffer) and then the view is released.


inline requires hd_std::is_pointer_v<PtrT>

template<class Role, hd_std::size_t Index, class ViewT, typename PtrT> inline SBIO_HD auto release(ViewT view, PtrT offset_ptr) requires hd_std::is_pointer_v<PtrT>

Defined in src/lib/sbio/core/storage_view.hh:152

Return Name Description
StorageT & m_storage
hd_std::atomic< hd_std::size_t > * m_num_views
hd_std::atomic< hd_std::size_t > m_acquired_count

StorageT & m_storage

Defined in src/lib/sbio/core/storage_view.hh:177


hd_std::atomic< hd_std::size_t > * m_num_views { nullptr }

Defined in src/lib/sbio/core/storage_view.hh:180


hd_std::atomic< hd_std::size_t > m_acquired_count { 0 }

Defined in src/lib/sbio/core/storage_view.hh:181