alpaka
Abstraction Library for Parallel Kernel Acceleration
Traits.hpp
Go to the documentation of this file.
1 /* Copyright 2022 Benjamin Worpitz, Bernhard Manfred Gruber
2  * SPDX-License-Identifier: MPL-2.0
3  */
4 
5 #pragma once
6 
7 #include "alpaka/core/Common.hpp"
9 
10 #include <type_traits>
11 
12 namespace alpaka
13 {
15  {
16  };
17 
18  //! The block shared dynamic memory operation traits.
19  namespace trait
20  {
21  //! The block shared dynamic memory get trait.
22  template<typename T, typename TBlockSharedMemDyn, typename TSfinae = void>
24  } // namespace trait
25 
26  //! Get block shared dynamic memory.
27  //!
28  //! The available size of the memory can be defined by specializing the trait
29  //! BlockSharedMemDynSizeBytes for a kernel.
30  //! The Memory can be accessed by all threads within a block.
31  //! Access to the memory is not thread safe.
32  //!
33  //! \tparam T The element type.
34  //! \tparam TBlockSharedMemDyn The block shared dynamic memory implementation type.
35  //! \param blockSharedMemDyn The block shared dynamic memory implementation.
36  //! \return Pointer to pre-allocated contiguous memory.
38  template<typename T, typename TBlockSharedMemDyn>
39  ALPAKA_FN_ACC auto getDynSharedMem(TBlockSharedMemDyn const& blockSharedMemDyn) -> T*
40  {
43  }
44 } // namespace alpaka
#define ALPAKA_FN_ACC
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_F...
Definition: Common.hpp:38
#define ALPAKA_NO_HOST_ACC_WARNING
Disable nvcc warning: 'calling a host function from host device function.' Usage: ALPAKA_NO_HOST_ACC_...
Definition: Common.hpp:82
typename detail::ImplementationBaseType< TConcept, TDerived >::type ImplementationBase
Returns the type that implements the given concept in the inheritance hierarchy.
Definition: Concepts.hpp:66
The alpaka accelerator library.
ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_ACC auto getDynSharedMem(TBlockSharedMemDyn const &blockSharedMemDyn) -> T *
Get block shared dynamic memory.
Definition: Traits.hpp:39
The block shared dynamic memory get trait.
Definition: Traits.hpp:23