alpaka
Abstraction Library for Parallel Kernel Acceleration
alpaka::detail::BlockSharedMemStMemberImpl< TMinDataAlignBytes > Class Template Reference

Implementation of static block shared memory provider. More...

#include <BlockSharedMemStMemberImpl.hpp>

Public Member Functions

 BlockSharedMemStMemberImpl (std::uint8_t *mem, std::size_t capacity)
 
template<typename T >
void alloc (std::uint32_t id) const
 
template<typename T >
auto getLatestVarPtr () const -> T *
 Get last allocated variable. More...
 
template<typename T >
auto getVarPtr (std::uint32_t id) const -> T *
 Give the pointer to an exiting variable. More...
 

Detailed Description

template<std::size_t TMinDataAlignBytes = core::vectorization::defaultAlignment>
class alpaka::detail::BlockSharedMemStMemberImpl< TMinDataAlignBytes >

Implementation of static block shared memory provider.

externally allocated fixed-size memory, likely provided by BlockSharedMemDynMember.

Definition at line 23 of file BlockSharedMemStMemberImpl.hpp.

Constructor & Destructor Documentation

◆ BlockSharedMemStMemberImpl()

template<std::size_t TMinDataAlignBytes = core::vectorization::defaultAlignment>
alpaka::detail::BlockSharedMemStMemberImpl< TMinDataAlignBytes >::BlockSharedMemStMemberImpl ( std::uint8_t *  mem,
std::size_t  capacity 
)
inline

Definition at line 38 of file BlockSharedMemStMemberImpl.hpp.

Member Function Documentation

◆ alloc()

template<std::size_t TMinDataAlignBytes = core::vectorization::defaultAlignment>
template<typename T >
void alpaka::detail::BlockSharedMemStMemberImpl< TMinDataAlignBytes >::alloc ( std::uint32_t  id) const
inline

Definition at line 51 of file BlockSharedMemStMemberImpl.hpp.

◆ getLatestVarPtr()

template<std::size_t TMinDataAlignBytes = core::vectorization::defaultAlignment>
template<typename T >
auto alpaka::detail::BlockSharedMemStMemberImpl< TMinDataAlignBytes >::getLatestVarPtr ( ) const -> T*
inline

Get last allocated variable.

Definition at line 105 of file BlockSharedMemStMemberImpl.hpp.

◆ getVarPtr()

template<std::size_t TMinDataAlignBytes = core::vectorization::defaultAlignment>
template<typename T >
auto alpaka::detail::BlockSharedMemStMemberImpl< TMinDataAlignBytes >::getVarPtr ( std::uint32_t  id) const -> T*
inline

Give the pointer to an exiting variable.

Template Parameters
Ttype of the variable
Parameters
idunique id of the variable
Returns
nullptr if variable with id not exists

Definition at line 79 of file BlockSharedMemStMemberImpl.hpp.


The documentation for this class was generated from the following file: