Skip to content

Commit

Permalink
Ensure the views from DeviceAllocation.as_buffer are writeable.
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddieWitherden committed Apr 24, 2016
1 parent a2bfec1 commit d036be6
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 d036be6

Please sign in to comment.