19 #include <condition_variable>
26 #if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) || defined(ALPAKA_ACC_GPU_HIP_ENABLED)
30 template<
typename TApi>
31 class EventUniformCudaHipRt;
33 template<
typename TApi>
34 class DevUniformCudaHipRt;
36 namespace uniform_cuda_hip::detail
39 template<
typename TApi>
45 , m_UniformCudaHipQueue()
61 TApi::streamCreateWithFlags(&m_UniformCudaHipQueue, TApi::streamNonBlocking));
80 return m_UniformCudaHipQueue;
88 typename TApi::Stream_t m_UniformCudaHipQueue;
92 template<
typename TApi,
bool TBlocking>
112 return !((*this) == rhs);
133 template<
typename TApi,
bool TBlocking>
134 struct GetDev<uniform_cuda_hip::detail::QueueUniformCudaHipRt<TApi, TBlocking>>
140 return queue.m_spQueueImpl->m_dev;
145 template<
typename TApi,
bool TBlocking>
146 struct Empty<uniform_cuda_hip::detail::QueueUniformCudaHipRt<TApi, TBlocking>>
154 typename TApi::Error_t ret = TApi::success;
156 ret = TApi::streamQuery(queue.getNativeHandle()),
157 TApi::errorNotReady);
158 return (ret == TApi::success);
166 template<
typename TApi,
bool TBlocking>
180 template<
typename TApi,
bool TBlocking>
181 struct DevType<uniform_cuda_hip::detail::QueueUniformCudaHipRt<TApi, TBlocking>>
187 template<
typename TApi,
bool TBlocking>
188 struct EventType<uniform_cuda_hip::detail::QueueUniformCudaHipRt<TApi, TBlocking>>
194 template<
typename TApi,
bool TBlocking,
typename TTask>
195 struct Enqueue<uniform_cuda_hip::detail::QueueUniformCudaHipRt<TApi, TBlocking>, TTask>
213 auto data = std::unique_ptr<HostFuncData>(
reinterpret_cast<HostFuncData*
>(
arg));
214 auto& queue = data->q;
215 auto f = queue.m_callbackThread.submit([d = std::move(data)] { d->t(); });
221 TTask
const& task) ->
void
224 queue.getNativeHandle(),
225 uniformCudaHipRtHostFunc,
226 new HostFuncData{*queue.m_spQueueImpl, task}));
227 if constexpr(TBlocking)
233 template<
typename TApi,
bool TBlocking>
234 struct NativeHandle<uniform_cuda_hip::detail::QueueUniformCudaHipRt<TApi, TBlocking>>
#define ALPAKA_DEBUG_MINIMAL_LOG_SCOPE
constexpr ALPAKA_NO_HOST_ACC_WARNING ALPAKA_FN_HOST_ACC T arg(Complex< T > const &x)
Argument.
The alpaka accelerator library.
Tag used in class inheritance hierarchies that describes that a specific interface (TInterface) is im...