alpaka
Abstraction Library for Parallel Kernel Acceleration
Loading...
Searching...
No Matches
alpaka::onHost::DeviceProperties Struct Reference

Properties of a device. More...

#include <DeviceProperties.hpp>

Public Member Functions

template<uint32_t T_dim>
Vec< uint32_t, T_dim > getMaxBlocksPerGrid () const
 Maximum number of blocks within a grid for each dimension.
template<uint32_t T_dim>
Vec< uint32_t, T_dim > getMaxThreadsPerBlock () const
 Maximum number of threads within a thread block for each dimension.
auto getName () const

Public Attributes

size_t globalMemCapacityBytes
 The total amount of global device memory in bytes.
uint32_t maxBlocksPerGrid
 The maximum total number of blocks within a grid.
uint32_t maxThreadsPerBlock
 The maximum total number of threads per thread block.
uint32_t multiProcessorCount
 The number of multiprocessors.
std::string name
 The name of the device.
uint32_t sharedMemPerBlockBytes
 The amount of shared memory per thread block in bytes.
uint32_t warpSize
 The warp size.

Detailed Description

Properties of a device.

Collection of static properties of a device.

Definition at line 28 of file DeviceProperties.hpp.

Member Function Documentation

◆ getMaxBlocksPerGrid()

template<uint32_t T_dim>
Vec< uint32_t, T_dim > alpaka::onHost::DeviceProperties::getMaxBlocksPerGrid ( ) const
inline

Maximum number of blocks within a grid for each dimension.

Attention
Do not assume that the limits are equal for any dimension. The product of two or more dimensions can exceed maxBlocksPerGrid, this will result in an invalid configuration when used for kernel execution. All values are 32-bit indexes, take care of overflows.
Template Parameters
T_dimNumber of dimensions used for a kernel call.
Returns
Maximum number of blocks, usable for ThreadSpec.

Definition at line 88 of file DeviceProperties.hpp.

◆ getMaxThreadsPerBlock()

template<uint32_t T_dim>
Vec< uint32_t, T_dim > alpaka::onHost::DeviceProperties::getMaxThreadsPerBlock ( ) const
inline

Maximum number of threads within a thread block for each dimension.

Attention
Do not assume that the limits are equal for any dimension. The product of two or more dimensions can exceed maxThreadsPerBlock, this will result in an invalid configuration when used for kernel execution. All values are 32-bit indexes, take care of overflows.
Template Parameters
T_dimNumber of dimensions used for a kernel call.
Returns
Maximum number of threads within a block, usable for ThreadSpec.

Definition at line 68 of file DeviceProperties.hpp.

◆ getName()

auto alpaka::onHost::DeviceProperties::getName ( ) const
inline

Definition at line 30 of file DeviceProperties.hpp.

Member Data Documentation

◆ globalMemCapacityBytes

size_t alpaka::onHost::DeviceProperties::globalMemCapacityBytes

The total amount of global device memory in bytes.

Attention
It is not the amount of free memory!

Device memory is the physical memory of the compute device. On systems with a GPU which is sharing the memory with the host CPU, this value may be equal to the total amount of system memory.

Definition at line 43 of file DeviceProperties.hpp.

◆ maxBlocksPerGrid

uint32_t alpaka::onHost::DeviceProperties::maxBlocksPerGrid

The maximum total number of blocks within a grid.

Definition at line 76 of file DeviceProperties.hpp.

◆ maxThreadsPerBlock

uint32_t alpaka::onHost::DeviceProperties::maxThreadsPerBlock

The maximum total number of threads per thread block.

Definition at line 56 of file DeviceProperties.hpp.

◆ multiProcessorCount

uint32_t alpaka::onHost::DeviceProperties::multiProcessorCount

The number of multiprocessors.

Definition at line 49 of file DeviceProperties.hpp.

◆ name

std::string alpaka::onHost::DeviceProperties::name

The name of the device.

Definition at line 47 of file DeviceProperties.hpp.

◆ sharedMemPerBlockBytes

uint32_t alpaka::onHost::DeviceProperties::sharedMemPerBlockBytes

The amount of shared memory per thread block in bytes.

Definition at line 45 of file DeviceProperties.hpp.

◆ warpSize

uint32_t alpaka::onHost::DeviceProperties::warpSize

The warp size.

Number of threads per thread block that are executed in lock-step.

Definition at line 54 of file DeviceProperties.hpp.


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