26#if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) || defined(ALPAKA_ACC_GPU_HIP_ENABLED)
32 template<
typename TPlatform,
typename TSfinae>
36 namespace uniform_cuda_hip::detail
38 template<
typename TApi,
bool TBlocking>
39 class QueueUniformCudaHipRt;
42 template<
typename TApi>
45 template<
typename TApi>
48 template<
typename TApi>
51 template<
typename TApi,
typename TElem,
typename TDim,
typename TIdx>
55 template<
typename TApi>
72 return m_iDevice == rhs.m_iDevice;
77 return !((*this) == rhs);
87 return m_QueueRegistry->getAllExistingQueues();
94 m_QueueRegistry->registerQueue(spQueue);
100 , m_QueueRegistry(
std::make_shared<
alpaka::detail::QueueRegistry<IDeviceQueue>>())
106 std::shared_ptr<alpaka::detail::QueueRegistry<IDeviceQueue>> m_QueueRegistry;
112 template<
typename TApi>
113 struct GetName<DevUniformCudaHipRt<TApi>>
119 typename TApi::DeviceProp_t devProp;
122 return std::string(devProp.name);
127 template<
typename TApi>
128 struct GetMemBytes<DevUniformCudaHipRt<TApi>>
135 std::size_t freeInternal(0u);
136 std::size_t totalInternal(0u);
140 return totalInternal;
145 template<
typename TApi>
146 struct GetFreeMemBytes<DevUniformCudaHipRt<TApi>>
153 std::size_t freeInternal(0u);
154 std::size_t totalInternal(0u);
163 template<
typename TApi>
164 struct GetWarpSizes<DevUniformCudaHipRt<TApi>>
173 template<
typename TApi>
174 struct GetPreferredWarpSize<DevUniformCudaHipRt<TApi>>
181 TApi::deviceGetAttribute(&
warpSize, TApi::deviceAttributeWarpSize, dev.getNativeHandle()));
182 return static_cast<std::size_t
>(
warpSize);
186# ifdef ALPAKA_ACC_GPU_CUDA_ENABLED
189 struct GetPreferredWarpSize<DevUniformCudaHipRt<ApiCudaRt>>
201 template<
typename TApi>
202 struct Reset<DevUniformCudaHipRt<TApi>>
215 template<
typename TApi>
218 [[nodiscard]]
static auto getNativeHandle(DevUniformCudaHipRt<TApi>
const& dev)
220 return dev.getNativeHandle();
225 template<
typename TApi,
typename TElem,
typename TDim,
typename TIdx>
226 struct BufType<DevUniformCudaHipRt<TApi>, TElem, TDim, TIdx>
228 using type = BufUniformCudaHipRt<TApi, TElem, TDim, TIdx>;
232 template<
typename TApi>
233 struct PlatformType<DevUniformCudaHipRt<TApi>>
235 using type = PlatformUniformCudaHipRt<TApi>;
242 template<
typename TApi>
243 struct CurrentThreadWaitFor<DevUniformCudaHipRt<TApi>>
245 ALPAKA_FN_HOST static auto currentThreadWaitFor(DevUniformCudaHipRt<TApi>
const& dev) ->
void
255 template<
typename TApi>
256 struct QueueType<DevUniformCudaHipRt<TApi>, Blocking>
258 using type = QueueUniformCudaHipRtBlocking<TApi>;
261 template<
typename TApi>
262 struct QueueType<DevUniformCudaHipRt<TApi>, NonBlocking>
264 using type = QueueUniformCudaHipRtNonBlocking<TApi>;
#define ALPAKA_DEBUG_FULL_LOG_SCOPE
constexpr std::uint32_t warpSize
This is a shortcut for the trait defined above.
The alpaka accelerator library.
ALPAKA_FN_HOST constexpr auto getPreferredWarpSize(TDev const &dev) -> std::size_t
ALPAKA_FN_HOST auto getName(TDev const &dev) -> std::string
ALPAKA_FN_HOST auto getWarpSizes(TDev const &dev) -> std::vector< std::size_t >
ALPAKA_FN_HOST auto reset(TDev const &dev) -> void
Resets the device. What this method does is dependent on the accelerator.
ALPAKA_FN_HOST auto getFreeMemBytes(TDev const &dev) -> std::size_t
ALPAKA_FN_HOST auto getMemBytes(TDev const &dev) -> std::size_t
decltype(getNativeHandle(std::declval< TImpl >())) NativeHandle
Alias to the type of the native handle.
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...
static auto getNativeHandle(TImpl const &)