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 device_delete.h
19 * \brief Deletes variables in device memory
24 #include <thrust/detail/config.h>
25 #include <thrust/device_ptr.h>
30 /*! \addtogroup deallocation_functions Deallocation Functions
31 * \ingroup memory_management_functions
35 /*! \p device_delete deletes a \p device_ptr allocated with
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.
47 inline void device_delete(thrust::device_ptr<T> ptr,
55 #include <thrust/detail/device_delete.inl>