diff --git a/src/cpp/cuda.hpp b/src/cpp/cuda.hpp index 2099a2ed440e7b6bddb7cf6a4775e15d82ef4033..f60bb1d9cd77286b801b2bc7a65b3586e5daf7a0 100644 --- a/src/cpp/cuda.hpp +++ b/src/cpp/cuda.hpp @@ -1320,7 +1320,7 @@ namespace pycuda { CUtexref tr; CUDAPP_CALL_GUARDED(cuModuleGetTexRef, (&tr, mod->handle(), name)); - std::auto_ptr result( + std::unique_ptr result( new texture_reference(tr, false)); result->set_module(mod); return result.release(); @@ -1333,7 +1333,7 @@ namespace pycuda { CUsurfref sr; CUDAPP_CALL_GUARDED(cuModuleGetSurfRef, (&sr, mod->handle(), name)); - std::auto_ptr result( + std::unique_ptr result( new surface_reference(sr)); result->set_module(mod); return result.release(); @@ -1613,13 +1613,13 @@ namespace pycuda }; inline Py_ssize_t mem_alloc_pitch( - std::auto_ptr &da, + std::unique_ptr &da, unsigned int width, unsigned int height, unsigned int access_size) { CUdeviceptr devptr; pycuda_size_t pitch; CUDAPP_CALL_GUARDED(cuMemAllocPitch, (&devptr, &pitch, width, height, access_size)); - da = std::auto_ptr(new device_allocation(devptr)); + da = std::unique_ptr(new device_allocation(devptr)); return pitch; } diff --git a/src/cpp/cuda_gl.hpp b/src/cpp/cuda_gl.hpp index 8f2aa7f0edf6d9fd55e6f047a8ac98b66d0cb26c..04b7dd864a835269a8a9e7aa05cc7ca18a6d0964 100644 --- a/src/cpp/cuda_gl.hpp +++ b/src/cpp/cuda_gl.hpp @@ -294,7 +294,7 @@ namespace pycuda { namespace gl { CUarray devptr; CUDAPP_CALL_GUARDED(cuGraphicsSubResourceGetMappedArray, (&devptr, m_object->resource(), index, level)); - std::auto_ptr result( + std::unique_ptr result( new pycuda::array(devptr, false)); return result.release(); } diff --git a/src/wrapper/mempool.cpp b/src/wrapper/mempool.cpp index 66f43f7ee0c3f1faf571388278cc4aba242e1bf6..d889d516c5340d77fc06e02ea913700e6ce1e894 100644 --- a/src/wrapper/mempool.cpp +++ b/src/wrapper/mempool.cpp @@ -192,7 +192,7 @@ namespace py::stl_input_iterator(), back_inserter(dims)); - std::auto_ptr alloc( + std::unique_ptr alloc( new pooled_host_allocation( pool, tp_descr->elsize*pycuda::size_from_dims(dims.size(), &dims.front()))); diff --git a/src/wrapper/wrap_cudadrv.cpp b/src/wrapper/wrap_cudadrv.cpp index e16d777da48e6fa6b819e075bc5f872b59b47137..457820a6b967e32c051f43f6e27b838ca7a7784a 100644 --- a/src/wrapper/wrap_cudadrv.cpp +++ b/src/wrapper/wrap_cudadrv.cpp @@ -118,7 +118,7 @@ namespace py::tuple mem_alloc_pitch_wrap( size_t width, size_t height, unsigned int access_size) { - std::auto_ptr da; + std::unique_ptr da; Py_ssize_t pitch = mem_alloc_pitch( da, width, height, access_size); return py::make_tuple( @@ -571,7 +571,7 @@ namespace py::stl_input_iterator(), back_inserter(dims)); - std::auto_ptr alloc( + std::unique_ptr alloc( new Allocation( tp_descr->elsize*pycuda::size_from_dims(dims.size(), &dims.front()), par1) @@ -612,7 +612,7 @@ namespace throw pycuda::error("register_host_memory", CUDA_ERROR_INVALID_VALUE, "ary argument is not contiguous"); - std::auto_ptr regmem( + std::unique_ptr regmem( new registered_host_memory( PyArray_DATA(ary.ptr()), PyArray_NBYTES(ary.ptr()), flags, ary));