20 template<std::
size_t TDataAlignBytes = core::vectorization::defaultAlignment>
23 ,
public interface::Implements<ConceptBlockSharedSt, BlockSharedMemStMemberMasterSync<TDataAlignBytes>>
29 std::function<
void()> fnSync,
30 std::function<
bool()> fnIsMasterThread)
44 # pragma GCC diagnostic push
45 # pragma GCC diagnostic ignored \
48 template<
typename T, std::
size_t TDataAlignBytes, std::
size_t TuniqueId>
54 auto* data = blockSharedMemSt.template getVarPtr<T>(TuniqueId);
60 blockSharedMemSt.m_syncFn();
61 if(blockSharedMemSt.m_isMasterThreadFn())
63 blockSharedMemSt.template alloc<T>(TuniqueId);
66 blockSharedMemSt.m_syncFn();
68 data = blockSharedMemSt.template getLatestVarPtr<T>();
75 # pragma GCC diagnostic pop
77 template<std::
size_t TDataAlignBytes>
#define ALPAKA_ASSERT(...)
The assert can be explicit disabled by defining NDEBUG.
std::function< bool()> m_isMasterThreadFn
std::function< void()> m_syncFn
BlockSharedMemStMemberMasterSync(uint8_t *mem, std::size_t capacity, std::function< void()> fnSync, std::function< bool()> fnIsMasterThread)
Implementation of static block shared memory provider.
BlockSharedMemStMemberImpl(std::uint8_t *mem, std::size_t capacity)
The alpaka accelerator library.
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
static ALPAKA_FN_HOST auto declareVar(BlockSharedMemStMemberMasterSync< TDataAlignBytes > const &blockSharedMemSt) -> T &
The block shared static memory variable allocation operation trait.
static ALPAKA_FN_HOST auto freeVars(BlockSharedMemStMemberMasterSync< TDataAlignBytes > const &) -> void
The block shared static memory free operation trait.