2
* Copyright 2008-2012 NVIDIA Corporation
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
8
* http://www.apache.org/licenses/LICENSE-2.0
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.
18
/*! \file runtime_introspection.h
19
* \brief Defines the interface to functions
20
* providing introspection into the architecture
26
#include <thrust/detail/config.h>
28
// #include this for device_properties_t and function_attributes_t
29
#include <thrust/system/cuda/detail/cuda_launch_config.h>
31
// #include this for size_t
44
/*! Returns the current device ordinal.
46
inline int current_device();
48
/*! Returns a copy of the device_properties_t structure
49
* that is associated with a given device.
51
inline device_properties_t device_properties(int device_id);
53
/*! Returns a copy of the device_properties_t structure
54
* that is associated with the current device.
56
inline device_properties_t device_properties(void);
58
/*! Returns a copy of the function_attributes_t structure
59
* that is associated with a given __global__ function
61
template <typename KernelFunction>
62
inline function_attributes_t function_attributes(KernelFunction kernel);
64
/*! Returns the compute capability of a device in integer format.
65
* For example, returns 10 for sm_10 and 21 for sm_21
66
* \return The compute capability as an integer
68
inline size_t compute_capability(const device_properties_t &properties);
69
inline size_t compute_capability(void);
72
} // end namespace detail
73
} // end namespace cuda
74
} // end namespace system
75
} // end namespace thrust
77
#include <thrust/system/cuda/detail/runtime_introspection.inl>