27 template<alpaka::concepts::Api T_Api, alpaka::concepts::DeviceKind T_DeviceKind>
31 constexpr DeviceSpec(T_Api
api, T_DeviceKind deviceType) : m_api(
api), m_deviceType(deviceType)
35 template<alpaka::concepts::DeviceSpec T_DeviceSpec>
56 return m_api.getName() +
" " + m_deviceType.getName();
76 T_DeviceKind m_deviceType;
79 template<alpaka::concepts::DeviceSpec T_DeviceSpec>
87 template<alpaka::concepts::DeviceSpec T_DeviceSpec>
101#if !defined(ALPAKA_DISABLE_Host_Cpu)
105#if !defined(ALPAKA_DISABLE_Host_NumaCpu) && ALPAKA_HAS_HWLOC
109#if !defined(ALPAKA_DISABLE_OneApi_IntelGpu) && ALPAKA_LANG_ONEAPI
113#if !defined(ALPAKA_DISABLE_OneApi_NvidiaGpu) && ALPAKA_LANG_ONEAPI
117#if !defined(ALPAKA_DISABLE_OneApi_AmdGpu) && ALPAKA_LANG_ONEAPI
121#if !defined(ALPAKA_DISABLE_OneApi_Cpu) && ALPAKA_LANG_ONEAPI
125#if !defined(ALPAKA_DISABLE_Cuda_NvidiaGpu) && ALPAKA_LANG_CUDA
129#if !defined(ALPAKA_DISABLE_Hip_AmdGpu) && ALPAKA_LANG_HIP
#define ALPAKA_TYPEOF(...)
Get the type of instance.
Functionality which is usable on the host CPU controller thread.
auto makeDeviceSpec(T_DeviceSpec any)
Create a device specification object.
DeviceSpec(T_DeviceSpec const &deviceSpec) -> DeviceSpec< ALPAKA_TYPEOF(getApi(deviceSpec)), ALPAKA_TYPEOF(getDeviceKind(deviceSpec))>
constexpr auto enabledDeviceSpecs
list of enabled device specifications
constexpr decltype(auto) getDeviceKind(auto &&any)
Get the device type of an object.
constexpr decltype(auto) getApi(auto &&any)
Get the API an object depends on.
Concept for a combination of an API and device kind.
static constexpr bool isValid()
Checks if the device kind and api combination is valid.
std::string getName() const
constexpr T_DeviceKind getDeviceKind() const
constexpr DeviceSpec(T_DeviceSpec any)
constexpr T_Api getApi() const
constexpr DeviceSpec()=default
constexpr DeviceSpec(T_Api api, T_DeviceKind deviceType)