mgcpp
A C++ Math Library Based on CUDA
thread_guard.hpp
Go to the documentation of this file.
1 
2 // Copyright RedPortal, mujjingun 2017 - 2018.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifndef _MGCPP_CONTEXT_THREAD_GUARD_HPP_
8 #define _MGCPP_CONTEXT_THREAD_GUARD_HPP_
9 
10 #include <cstdlib>
11 #include <initializer_list>
12 
13 namespace mgcpp {
14 class thread_guard {
15  public:
16  inline explicit thread_guard(std::initializer_list<size_t> device,
17  bool cublas);
18 
19  inline explicit thread_guard(size_t device, bool cublas);
20 
21  inline ~thread_guard();
22 };
23 } // namespace mgcpp
24 
26 #endif
Definition: adapter_base.hpp:12
Definition: thread_guard.hpp:14
~thread_guard()
Definition: thread_guard.ipp:31
thread_guard(std::initializer_list< size_t > device, bool cublas)
Definition: thread_guard.ipp:13