alpaka
Abstraction Library for Parallel Kernel Acceleration
IGenericThreadsQueue.hpp
Go to the documentation of this file.
1 /* Copyright 2020 Axel Huebl, Benjamin Worpitz, Matthias Werner, Bernhard Manfred Gruber
2  * SPDX-License-Identifier: MPL-2.0
3  */
4 
5 #pragma once
6 
8 
9 namespace alpaka
10 {
11  template<typename TDev>
12  class EventGenericThreads;
13 
14 #if BOOST_COMP_CLANG
15 // avoid diagnostic warning: "has no out-of-line virtual method definitions; its vtable will be emitted in every
16 // translation unit [-Werror,-Wweak-vtables]" https://stackoverflow.com/a/29288300
17 # pragma clang diagnostic push
18 # pragma clang diagnostic ignored "-Wweak-vtables"
19 #endif
20 
21  //! The CPU queue interface
22  template<typename TDev>
24  {
25  public:
26  //! enqueue the event
27  virtual void enqueue(EventGenericThreads<TDev>&) = 0;
28  //! waiting for the event
29  virtual void wait(EventGenericThreads<TDev> const&) = 0;
30  virtual ~IGenericThreadsQueue() = default;
31  };
32 #if BOOST_COMP_CLANG
33 # pragma clang diagnostic pop
34 #endif
35 } // namespace alpaka
virtual ~IGenericThreadsQueue()=default
virtual void enqueue(EventGenericThreads< TDev > &)=0
enqueue the event
virtual void wait(EventGenericThreads< TDev > const &)=0
waiting for the event
The alpaka accelerator library.