OSDN Git Service

modified: utilsrc/src/Admin/Makefile
[eos/others.git] / utiltools / X86MAC64 / cuda / include / nvToolsExtCudaRt.h
1 /*
2 * Copyright 2012  NVIDIA Corporation.  All rights reserved.
3 *
4 * NOTICE TO USER:
5 *
6 * This source code is subject to NVIDIA ownership rights under U.S. and
7 * international Copyright laws.
8 *
9 * This software and the information contained herein is PROPRIETARY and
10 * CONFIDENTIAL to NVIDIA and is being provided under the terms and conditions
11 * of a form of NVIDIA software license agreement.
12 *
13 * NVIDIA MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE
14 * CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR
15 * IMPLIED WARRANTY OF ANY KIND.  NVIDIA DISCLAIMS ALL WARRANTIES WITH
16 * REGARD TO THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF
17 * MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE.
18 * IN NO EVENT SHALL NVIDIA BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL,
19 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
20 * OF USE, DATA OR PROFITS,  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
21 * OR OTHER TORTIOUS ACTION,  ARISING OUT OF OR IN CONNECTION WITH THE USE
22 * OR PERFORMANCE OF THIS SOURCE CODE.
23 *
24 * U.S. Government End Users.   This source code is a "commercial item" as
25 * that term is defined at  48 C.F.R. 2.101 (OCT 1995), consisting  of
26 * "commercial computer  software"  and "commercial computer software
27 * documentation" as such terms are  used in 48 C.F.R. 12.212 (SEPT 1995)
28 * and is provided to the U.S. Government only as a commercial end item.
29 * Consistent with 48 C.F.R.12.212 and 48 C.F.R. 227.7202-1 through
30 * 227.7202-4 (JUNE 1995), all U.S. Government End Users acquire the
31 * source code with only those rights set forth herein.
32 *
33 * Any use of this source code in individual and commercial software must
34 * include, in the user documentation and internal comments to the code,
35 * the above Disclaimer and U.S. Government End Users Notice.
36 */
37
38 #ifndef NVTOOLSEXT_CUDART_H_
39 #define NVTOOLSEXT_CUDART_H_
40
41 #include "cuda.h"
42 #include "cuda_runtime_api.h"
43
44 #include "nvToolsExt.h"
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif /* __cplusplus */
49
50 /* ========================================================================= */
51 /** \name Functions for CUDA Resource Naming
52 */
53 /** \addtogroup RESOURCE_NAMING
54  * \section RESOURCE_NAMING_CUDA CUDA Resource Naming
55  *
56  * This section covers the API functions that allow to annotate CUDA resources
57  * with user-provided names.
58  *
59  * @{
60  */
61
62 /* ------------------------------------------------------------------------- */
63 /** \brief Annotates a CUDA device.
64  *
65  * Allows the user to associate a CUDA device with a user-provided name.
66  *
67  * \param device - The id of the CUDA device to name.
68  * \param name   - The name of the CUDA device.
69  *
70  * \version \NVTX_VERSION_1
71  * @{ */
72 NVTX_DECLSPEC void NVTX_API nvtxNameCudaDeviceA(int device, const char* name);
73 NVTX_DECLSPEC void NVTX_API nvtxNameCudaDeviceW(int device, const wchar_t* name);
74 /** @} */
75
76 /* ------------------------------------------------------------------------- */
77 /** \brief Annotates a CUDA stream.
78  *
79  * Allows the user to associate a CUDA stream with a user-provided name.
80  *
81  * \param stream - The handle of the CUDA stream to name.
82  * \param name   - The name of the CUDA stream.
83  *
84  * \version \NVTX_VERSION_1
85  * @{ */
86 NVTX_DECLSPEC void NVTX_API nvtxNameCudaStreamA(cudaStream_t stream, const char* name);
87 NVTX_DECLSPEC void NVTX_API nvtxNameCudaStreamW(cudaStream_t stream, const wchar_t* name);
88 /** @} */
89
90 /* ------------------------------------------------------------------------- */
91 /** \brief Annotates a CUDA event.
92  *
93  * Allows the user to associate a CUDA event with a user-provided name.
94  *
95  * \param event - The handle of the CUDA event to name.
96  * \param name  - The name of the CUDA event.
97  *
98  * \version \NVTX_VERSION_1
99  * @{ */
100 NVTX_DECLSPEC void NVTX_API nvtxNameCudaEventA(cudaEvent_t event, const char* name);
101 NVTX_DECLSPEC void NVTX_API nvtxNameCudaEventW(cudaEvent_t event, const wchar_t* name);
102 /** @} */
103
104 /** @} */ /* END RESOURCE_NAMING */
105
106 /* ========================================================================= */
107 #ifdef UNICODE
108   #define nvtxNameCudaDevice nvtxNameCudaDeviceW
109   #define nvtxNameCudaStream nvtxNameCudaStreamW
110   #define nvtxNameCudaEvent  nvtxNameCudaEventW
111 #else
112   #define nvtxNameCudaDevice nvtxNameCudaDeviceA
113   #define nvtxNameCudaStream nvtxNameCudaStreamA
114   #define nvtxNameCudaEvent  nvtxNameCudaEventA
115 #endif
116
117 #ifdef __cplusplus
118 }
119 #endif /* __cplusplus */
120
121 #endif /* NVTOOLSEXT_CUDART_H_ */