StorageView
StorageView
Section titled “StorageView”#include <sbio/core/storage_view.hh>template<class StorageT, class EPolicy>class StorageViewDefined in src/lib/sbio/core/storage_view.hh:87
Public Methods
Section titled “Public Methods”| 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> |
StorageView
Section titled “StorageView”inline
inline SBIO_HD StorageView(StorageT & storage)Defined in src/lib/sbio/core/storage_view.hh:90
StorageView
Section titled “StorageView”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() constDefined in src/lib/sbio/core/storage_view.hh:102
acquire
Section titled “acquire”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
release
Section titled “release”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
release_written
Section titled “release_written”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.
release
Section titled “release”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
Private Attributes
Section titled “Private Attributes”| 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 |
m_storage
Section titled “m_storage”StorageT & m_storageDefined in src/lib/sbio/core/storage_view.hh:177
m_num_views
Section titled “m_num_views”hd_std::atomic< hd_std::size_t > * m_num_views { nullptr }Defined in src/lib/sbio/core/storage_view.hh:180
m_acquired_count
Section titled “m_acquired_count”hd_std::atomic< hd_std::size_t > m_acquired_count { 0 }Defined in src/lib/sbio/core/storage_view.hh:181