Thrust
execution_policy.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008-2013 NVIDIA Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
21 #pragma once
22 
23 #include <thrust/detail/config.h>
24 #include <thrust/detail/execution_policy.h>
25 #include <thrust/detail/execute_with_allocator.h>
26 #include <thrust/detail/seq.h>
27 
29 
30 // #include the host system's execution_policy header
31 #define __THRUST_HOST_SYSTEM_EXECUTION_POLICY_HEADER <__THRUST_HOST_SYSTEM_ROOT/execution_policy.h>
32 #include __THRUST_HOST_SYSTEM_EXECUTION_POLICY_HEADER
33 #undef __THRUST_HOST_SYSTEM_EXECUTION_POLICY_HEADER
34 
35 // #include the device system's execution_policy.h header
36 #define __THRUST_DEVICE_SYSTEM_EXECUTION_POLICY_HEADER <__THRUST_DEVICE_SYSTEM_ROOT/execution_policy.h>
37 #include __THRUST_DEVICE_SYSTEM_EXECUTION_POLICY_HEADER
38 #undef __THRUST_DEVICE_SYSTEM_EXECUTION_POLICY_HEADER
39 
41 
42 THRUST_NAMESPACE_BEGIN
43 
48 namespace detail
49 {
50 
51 
52 typedef thrust::system::__THRUST_HOST_SYSTEM_NAMESPACE::detail::par_t host_t;
53 
54 
55 typedef thrust::system::__THRUST_DEVICE_SYSTEM_NAMESPACE::detail::par_t device_t;
56 
57 
58 } // end detail
59 
60 
70 // define execution_policy for the purpose of Doxygenating it
71 // it is actually defined elsewhere
72 #if 0
73 
126 template<typename DerivedPolicy>
127 struct execution_policy : thrust::detail::execution_policy_base<DerivedPolicy>
128 {};
129 #endif
130 
131 
187 template<typename DerivedPolicy>
189  : thrust::system::__THRUST_HOST_SYSTEM_NAMESPACE::execution_policy<DerivedPolicy>
190 {};
191 
192 
248 template<typename DerivedPolicy>
250  : thrust::system::__THRUST_DEVICE_SYSTEM_NAMESPACE::execution_policy<DerivedPolicy>
251 {};
252 
253 
296 static const detail::host_t host;
297 
298 
345 THRUST_INLINE_CONSTANT detail::device_t device;
346 
347 
348 // define seq for the purpose of Doxygenating it
349 // it is actually defined elsewhere
350 #if 0
351 
385 static const detail::seq_t seq;
386 #endif
387 
388 
393 THRUST_NAMESPACE_END
static const detail::host_t host
Definition: execution_policy.h:296
THRUST_INLINE_CONSTANT detail::device_t device
Definition: execution_policy.h:345
Definition: execution_policy.h:188
Definition: execution_policy.h:249