OSDN Git Service

modified: utilsrc/src/Admin/Makefile
[eos/others.git] / utiltools / X86MAC64 / cuda / include / thrust / device_delete.h
1 /*
2  *  Copyright 2008-2012 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
17
18 /*! \file device_delete.h
19  *  \brief Deletes variables in device memory
20  */
21
22 #pragma once
23
24 #include <thrust/detail/config.h>
25 #include <thrust/device_ptr.h>
26
27 namespace thrust
28 {
29
30 /*! \addtogroup deallocation_functions Deallocation Functions
31  *  \ingroup memory_management_functions
32  *  \{
33  */
34
35 /*! \p device_delete deletes a \p device_ptr allocated with
36  *  \p device_new.
37  *
38  *  \param ptr The \p device_ptr to delete, assumed to have
39  *         been allocated with \p device_new.
40  *  \param n The number of objects to destroy at \p ptr. Defaults to \c 1
41  *         similar to \p device_new.
42  *
43  *  \see device_ptr
44  *  \see device_new
45  */
46 template<typename T>
47   inline void device_delete(thrust::device_ptr<T> ptr,
48                             const size_t n = 1);
49
50 /*! \}
51  */
52
53 } // end thrust
54
55 #include <thrust/detail/device_delete.inl>
56