Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #107 from FreddieWitherden/master
Ensure the views from DeviceAllocation.as_buffer are writeable.
  • Loading branch information
inducer committed Apr 24, 2016
2 parents a2bfec1 + d036be6 commit 8da3019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/cuda.hpp
Expand Up @@ -1499,7 +1499,7 @@ namespace pycuda
py::handle<>(
#if PY_VERSION_HEX >= 0x03030000
PyMemoryView_FromMemory((char *) (get_pointer() + offset), size,
PyBUF_READ | PyBUF_WRITE)
PyBUF_WRITE)
#else /* Py2 */
PyBuffer_FromReadWriteMemory((void *) (get_pointer() + offset), size)
#endif
Expand Down

0 comments on commit 8da3019

Please sign in to comment.