alpaka
Abstraction Library for Parallel Kernel Acceleration
AccDevProps.hpp
Go to the documentation of this file.
1 /* Copyright 2024 Benjamin Worpitz, Bernhard Manfred Gruber
2  * SPDX-License-Identifier: MPL-2.0
3  */
4 
5 #pragma once
6 
7 #include "alpaka/core/Common.hpp"
8 #include "alpaka/vec/Vec.hpp"
9 
10 namespace alpaka
11 {
12  //! The acceleration properties on a device.
13  //
14  // \TODO:
15  // TIdx m_maxClockFrequencyHz; //!< Maximum clock frequency of the device in Hz.
16  template<typename TDim, typename TIdx>
17  struct AccDevProps
18  {
19  static_assert(
20  sizeof(TIdx) >= sizeof(int),
21  "Index type is not supported, consider using int or a larger type.");
22 
23  // Please keep the order of data members so aggregate initialization does not break!
24  TIdx m_multiProcessorCount; //!< The number of multiprocessors.
25  Vec<TDim, TIdx> m_gridBlockExtentMax; //!< The maximum number of blocks in each dimension of the grid.
26  TIdx m_gridBlockCountMax; //!< The maximum number of blocks in a grid.
27  Vec<TDim, TIdx> m_blockThreadExtentMax; //!< The maximum number of threads in each dimension of a block.
28  TIdx m_blockThreadCountMax; //!< The maximum number of threads in a block.
29  Vec<TDim, TIdx> m_threadElemExtentMax; //!< The maximum number of elements in each dimension of a thread.
30  TIdx m_threadElemCountMax; //!< The maximum number of elements in a threads.
31  size_t m_sharedMemSizeBytes; //!< The size of shared memory per block
32  size_t m_globalMemSizeBytes; //!< The size of global memory
33  };
34 } // namespace alpaka
The alpaka accelerator library.
The acceleration properties on a device.
Definition: AccDevProps.hpp:18
TIdx m_gridBlockCountMax
The maximum number of blocks in a grid.
Definition: AccDevProps.hpp:26
Vec< TDim, TIdx > m_gridBlockExtentMax
The maximum number of blocks in each dimension of the grid.
Definition: AccDevProps.hpp:25
TIdx m_threadElemCountMax
The maximum number of elements in a threads.
Definition: AccDevProps.hpp:30
size_t m_globalMemSizeBytes
The size of global memory.
Definition: AccDevProps.hpp:32
Vec< TDim, TIdx > m_blockThreadExtentMax
The maximum number of threads in each dimension of a block.
Definition: AccDevProps.hpp:27
Vec< TDim, TIdx > m_threadElemExtentMax
The maximum number of elements in each dimension of a thread.
Definition: AccDevProps.hpp:29
size_t m_sharedMemSizeBytes
The size of shared memory per block.
Definition: AccDevProps.hpp:31
TIdx m_blockThreadCountMax
The maximum number of threads in a block.
Definition: AccDevProps.hpp:28
TIdx m_multiProcessorCount
The number of multiprocessors.
Definition: AccDevProps.hpp:21