WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/cpp/curand.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ namespace pycuda { namespace curandom {
buf_wrapper.get(dst.ptr(), PyBUF_ANY_CONTIGUOUS | PyBUF_WRITABLE);

void *buf = buf_wrapper.m_buf.buf;
PYCUDA_BUFFER_SIZE_T len = buf_wrapper.m_buf.len;

if (CURAND_DIRECTION_VECTORS_32_JOEKUO6 == set
#if CUDAPP_CUDA_VERSION >= 4000
Expand Down
6 changes: 2 additions & 4 deletions src/wrapper/wrap_cudadrv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ namespace
module *module_from_buffer(py::object buffer, py::object py_options,
py::object message_handler)
{
PYCUDA_BUFFER_SIZE_T len;
py_buffer_wrapper py_buf;
py_buf.get(buffer.ptr(), PyBUF_ANY_CONTIGUOUS);
CUmodule mod;
Expand Down Expand Up @@ -499,16 +498,15 @@ namespace

void add_data(py::object py_data, CUjitInputType input_type, py::str py_name)
{
Py_buffer py_buf;
PYCUDA_BUFFER_SIZE_T data_buf_len;
Py_buffer py_buf;
if (PyObject_GetBuffer(py_data.ptr(), &py_buf, PyBUF_ANY_CONTIGUOUS)) {
throw py::error_already_set();
}
const char* name = (py_name.ptr() != Py_None)?
py::extract<const char*>(py_name) : NULL;
const CUresult cu_result = cuLinkAddData(m_link_state, input_type, py_buf.buf,
py_buf.len, name, 0, NULL, NULL);
PyBuffer_Release(&py_buf);
PyBuffer_Release(&py_buf);
check_cu_result("cuLinkAddData", cu_result);
}

Expand Down