/* Generated by Cython 0.29.32 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe\\cuda-headers\\include\\cuda.h",
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe\\cuda-headers\\include\\cudaProfiler.h",
            "cuda"
        ],
        "include_dirs": [
            ".\\cuda",
            "cuda",
            "C:\\ProgramData\\Anaconda3\\conda-bld\\cuda-python_1662763164470\\_h_env",
            "C:\\Users\\mavaz\\git\\cuda-python-build-utils\\conda-recipe\\cuda-headers/include"
        ],
        "language": "c++",
        "library_dirs": [
            "C:\\ProgramData\\Anaconda3\\conda-bld\\cuda-python_1662763164470\\_h_env\\Lib\\site-packages",
            "C:\\ProgramData\\Anaconda3\\conda-bld\\cuda-python_1662763164470\\_h_env\\lib"
        ],
        "name": "cuda.ccuda",
        "sources": [
            "cuda\\ccuda.pyx"
        ]
    },
    "module_name": "cuda.ccuda"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_32"
#define CYTHON_HEX_VERSION 0x001D20F0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900)
  #endif
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(U other) { return *ptr == other; }
    template<typename U> bool operator !=(U other) { return *ptr != other; }
  private:
    T *ptr;
};

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if defined(PyUnicode_IS_READY)
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #else
  #define __Pyx_PyUnicode_READY(op)       (0)
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE)
  #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
  #endif
  #else
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__cuda__ccuda
#define __PYX_HAVE_API__cuda__ccuda
/* Early includes */
#include <stdint.h>
#include "cuda.h"
#include "cudaProfiler.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "cuda\\ccuda.pyx",
};
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()


/* "cuda/ccuda.pxd":2473
 * 
 * 
 * ctypedef unsigned int GLenum             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int GLuint
 */
typedef unsigned int __pyx_t_4cuda_5ccuda_GLenum;

/* "cuda/ccuda.pxd":2475
 * ctypedef unsigned int GLenum
 * 
 * ctypedef unsigned int GLuint             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef unsigned int __pyx_t_4cuda_5ccuda_GLuint;

/* "cuda/ccuda.pxd":2487
 * ctypedef void* EGLStreamKHR
 * 
 * ctypedef unsigned int EGLint             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef unsigned int __pyx_t_4cuda_5ccuda_EGLint;

/* "cuda/ccuda.pxd":2494
 * ctypedef void* EGLSyncKHR
 * 
 * ctypedef uint32_t VdpDevice             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned long long VdpGetProcAddress
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpDevice;

/* "cuda/ccuda.pxd":2496
 * ctypedef uint32_t VdpDevice
 * 
 * ctypedef unsigned long long VdpGetProcAddress             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpVideoSurface
 */
typedef unsigned PY_LONG_LONG __pyx_t_4cuda_5ccuda_VdpGetProcAddress;

/* "cuda/ccuda.pxd":2498
 * ctypedef unsigned long long VdpGetProcAddress
 * 
 * ctypedef uint32_t VdpVideoSurface             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpOutputSurface
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpVideoSurface;

/* "cuda/ccuda.pxd":2500
 * ctypedef uint32_t VdpVideoSurface
 * 
 * ctypedef uint32_t VdpOutputSurface             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef uint32_t __pyx_t_4cuda_5ccuda_VdpOutputSurface;

/*--- Type declarations ---*/
union __pyx_t_4cuda_5ccuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u;
struct __pyx_t_4cuda_5ccuda_CUeglFrame_st;

/* "cuda/ccuda.pxd":2511
 * 
 * 
 * cdef enum CUeglFrameType_enum:             # <<<<<<<<<<<<<<
 *     CU_EGL_FRAME_TYPE_ARRAY = 0
 *     CU_EGL_FRAME_TYPE_PITCH = 1
 */
enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum {
  __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_ARRAY = 0,
  __pyx_e_4cuda_5ccuda_CU_EGL_FRAME_TYPE_PITCH = 1
};

/* "cuda/ccuda.pxd":2517
 * ctypedef CUeglFrameType_enum CUeglFrameType
 * 
 * cdef enum CUeglResourceLocationFlags_enum:             # <<<<<<<<<<<<<<
 *     CU_EGL_RESOURCE_LOCATION_SYSMEM = 0
 *     CU_EGL_RESOURCE_LOCATION_VIDMEM = 1
 */
enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum {
  __pyx_e_4cuda_5ccuda_CU_EGL_RESOURCE_LOCATION_SYSMEM = 0,
  __pyx_e_4cuda_5ccuda_CU_EGL_RESOURCE_LOCATION_VIDMEM = 1
};

/* "cuda/ccuda.pxd":2523
 * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags
 * 
 * cdef enum CUeglColorFormat_enum:             # <<<<<<<<<<<<<<
 *     CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0
 *     CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1
 */
enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum {
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RGB = 4,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BGR = 5,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ARGB = 6,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RGBA = 7,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_L = 8,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_R = 9,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_422 = 12,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_422 = 13,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_ABGR = 14,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BGRA = 15,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_A = 16,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_RG = 17,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV = 18,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY_ER = 26,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_UYVY_ER = 27,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUYV_ER = 28,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU_ER = 29,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV_ER = 30,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA_ER = 31,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_AYUV_ER = 32,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y = 82,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_ER = 96,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y_709_ER = 97,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_ER = 98,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10_709_ER = 99,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_ER = 0x64,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12_709_ER = 0x65,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUVA = 0x66,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YUV = 0x67,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_YVYU = 0x68,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_VYUY = 0x69,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 0x6A,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 0x6B,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 0x6C,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 0x6D,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 0x6E,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 0x6F,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 0x70,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 0x71,
  __pyx_e_4cuda_5ccuda_CU_EGL_COLOR_FORMAT_MAX = 0x72
};

/* "cuda/ccuda.pxd":2692
 * 
 * 
 * cdef enum CUGLDeviceList_enum:             # <<<<<<<<<<<<<<
 *     CU_GL_DEVICE_LIST_ALL = 1
 *     CU_GL_DEVICE_LIST_CURRENT_FRAME = 2
 */
enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum {
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_ALL = 1,
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_CURRENT_FRAME = 2,
  __pyx_e_4cuda_5ccuda_CU_GL_DEVICE_LIST_NEXT_FRAME = 3
};

/* "cuda/ccuda.pxd":2699
 * ctypedef CUGLDeviceList_enum CUGLDeviceList
 * 
 * cdef enum CUGLmap_flags_enum:             # <<<<<<<<<<<<<<
 *     CU_GL_MAP_RESOURCE_FLAGS_NONE = 0
 *     CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1
 */
enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum {
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_NONE = 0,
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_READ_ONLY = 1,
  __pyx_e_4cuda_5ccuda_CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
};

/* "cuda/ccuda.pxd":2712
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND
 * 
 * cdef enum: CUDA_VERSION = 11080             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_VERSION = 0x2B48
};

/* "cuda/ccuda.pxd":2714
 * cdef enum: CUDA_VERSION = 11080
 * 
 * cdef enum: CU_IPC_HANDLE_SIZE = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_LEGACY = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_IPC_HANDLE_SIZE = 64
};

/* "cuda/ccuda.pxd":2716
 * cdef enum: CU_IPC_HANDLE_SIZE = 64
 * 
 * cdef enum: CU_STREAM_LEGACY = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_LEGACY = 1
};

/* "cuda/ccuda.pxd":2718
 * cdef enum: CU_STREAM_LEGACY = 1
 * 
 * cdef enum: CU_STREAM_PER_THREAD = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_PER_THREAD = 2
};

/* "cuda/ccuda.pxd":2720
 * cdef enum: CU_STREAM_PER_THREAD = 2
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
};

/* "cuda/ccuda.pxd":2722
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
};

/* "cuda/ccuda.pxd":2724
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4
};

/* "cuda/ccuda.pxd":2726
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5
};

/* "cuda/ccuda.pxd":2728
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5
 * 
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
};

/* "cuda/ccuda.pxd":2730
 * cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
};

/* "cuda/ccuda.pxd":2732
 * cdef enum: CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
 * 
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
};

/* "cuda/ccuda.pxd":2734
 * cdef enum: CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
 * 
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_PORTABLE = 1
};

/* "cuda/ccuda.pxd":2736
 * cdef enum: CU_MEMHOSTALLOC_PORTABLE = 1
 * 
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_DEVICEMAP = 2
};

/* "cuda/ccuda.pxd":2738
 * cdef enum: CU_MEMHOSTALLOC_DEVICEMAP = 2
 * 
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTALLOC_WRITECOMBINED = 4
};

/* "cuda/ccuda.pxd":2740
 * cdef enum: CU_MEMHOSTALLOC_WRITECOMBINED = 4
 * 
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_PORTABLE = 1
};

/* "cuda/ccuda.pxd":2742
 * cdef enum: CU_MEMHOSTREGISTER_PORTABLE = 1
 * 
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_DEVICEMAP = 2
};

/* "cuda/ccuda.pxd":2744
 * cdef enum: CU_MEMHOSTREGISTER_DEVICEMAP = 2
 * 
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_IOMEMORY = 4
};

/* "cuda/ccuda.pxd":2746
 * cdef enum: CU_MEMHOSTREGISTER_IOMEMORY = 4
 * 
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEMHOSTREGISTER_READ_ONLY = 8
};

/* "cuda/ccuda.pxd":2748
 * cdef enum: CU_MEMHOSTREGISTER_READ_ONLY = 8
 * 
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
};

/* "cuda/ccuda.pxd":2750
 * cdef enum: CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
 * 
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_MEMORY_DEDICATED = 1
};

/* "cuda/ccuda.pxd":2752
 * cdef enum: CUDA_EXTERNAL_MEMORY_DEDICATED = 1
 * 
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1
};

/* "cuda/ccuda.pxd":2754
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1
 * 
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2
};

/* "cuda/ccuda.pxd":2756
 * cdef enum: CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_NVSCISYNC_ATTR_SIGNAL = 1
};

/* "cuda/ccuda.pxd":2758
 * cdef enum: CUDA_NVSCISYNC_ATTR_SIGNAL = 1
 * 
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_NVSCISYNC_ATTR_WAIT = 2
};

/* "cuda/ccuda.pxd":2760
 * cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2
 * 
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_MEM_CREATE_USAGE_TILE_POOL = 1
};

/* "cuda/ccuda.pxd":2762
 * cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1
};

/* "cuda/ccuda.pxd":2764
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1
 * 
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_LAYERED = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2
};

/* "cuda/ccuda.pxd":2766
 * cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2
 * 
 * cdef enum: CUDA_ARRAY3D_LAYERED = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_LAYERED = 1
};

/* "cuda/ccuda.pxd":2768
 * cdef enum: CUDA_ARRAY3D_LAYERED = 1
 * 
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_2DARRAY = 1
};

/* "cuda/ccuda.pxd":2770
 * cdef enum: CUDA_ARRAY3D_2DARRAY = 1
 * 
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_SURFACE_LDST = 2
};

/* "cuda/ccuda.pxd":2772
 * cdef enum: CUDA_ARRAY3D_SURFACE_LDST = 2
 * 
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_CUBEMAP = 4
};

/* "cuda/ccuda.pxd":2774
 * cdef enum: CUDA_ARRAY3D_CUBEMAP = 4
 * 
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_TEXTURE_GATHER = 8
};

/* "cuda/ccuda.pxd":2776
 * cdef enum: CUDA_ARRAY3D_TEXTURE_GATHER = 8
 * 
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_DEPTH_TEXTURE = 16
};

/* "cuda/ccuda.pxd":2778
 * cdef enum: CUDA_ARRAY3D_DEPTH_TEXTURE = 16
 * 
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_SPARSE = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_COLOR_ATTACHMENT = 32
};

/* "cuda/ccuda.pxd":2780
 * cdef enum: CUDA_ARRAY3D_COLOR_ATTACHMENT = 32
 * 
 * cdef enum: CUDA_ARRAY3D_SPARSE = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_SPARSE = 64
};

/* "cuda/ccuda.pxd":2782
 * cdef enum: CUDA_ARRAY3D_SPARSE = 64
 * 
 * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_ARRAY3D_DEFERRED_MAPPING = 0x80
};

/* "cuda/ccuda.pxd":2784
 * cdef enum: CUDA_ARRAY3D_DEFERRED_MAPPING = 128
 * 
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSA_OVERRIDE_FORMAT = 1
};

/* "cuda/ccuda.pxd":2786
 * cdef enum: CU_TRSA_OVERRIDE_FORMAT = 1
 * 
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_READ_AS_INTEGER = 1
};

/* "cuda/ccuda.pxd":2788
 * cdef enum: CU_TRSF_READ_AS_INTEGER = 1
 * 
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_SRGB = 16
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_NORMALIZED_COORDINATES = 2
};

/* "cuda/ccuda.pxd":2790
 * cdef enum: CU_TRSF_NORMALIZED_COORDINATES = 2
 * 
 * cdef enum: CU_TRSF_SRGB = 16             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_SRGB = 16
};

/* "cuda/ccuda.pxd":2792
 * cdef enum: CU_TRSF_SRGB = 16
 * 
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32
};

/* "cuda/ccuda.pxd":2794
 * cdef enum: CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32
 * 
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_TRSF_SEAMLESS_CUBEMAP = 64
};

/* "cuda/ccuda.pxd":2796
 * cdef enum: CU_TRSF_SEAMLESS_CUBEMAP = 64
 * 
 * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_END = 0
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END_AS_INT = 0
};

/* "cuda/ccuda.pxd":2798
 * cdef enum: CU_LAUNCH_PARAM_END_AS_INT = 0
 * 
 * cdef enum: CU_LAUNCH_PARAM_END = 0             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_END = 0
};

/* "cuda/ccuda.pxd":2800
 * cdef enum: CU_LAUNCH_PARAM_END = 0
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1
};

/* "cuda/ccuda.pxd":2802
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_POINTER = 1
};

/* "cuda/ccuda.pxd":2804
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_POINTER = 1
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2
};

/* "cuda/ccuda.pxd":2806
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2
 * 
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_PARAM_TR_DEFAULT = -1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_LAUNCH_PARAM_BUFFER_SIZE = 2
};

/* "cuda/ccuda.pxd":2808
 * cdef enum: CU_LAUNCH_PARAM_BUFFER_SIZE = 2
 * 
 * cdef enum: CU_PARAM_TR_DEFAULT = -1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_DEVICE_CPU = -1
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_PARAM_TR_DEFAULT = -1L
};

/* "cuda/ccuda.pxd":2810
 * cdef enum: CU_PARAM_TR_DEFAULT = -1
 * 
 * cdef enum: CU_DEVICE_CPU = -1             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CU_DEVICE_INVALID = -2
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_CPU = -1L
};

/* "cuda/ccuda.pxd":2812
 * cdef enum: CU_DEVICE_CPU = -1
 * 
 * cdef enum: CU_DEVICE_INVALID = -2             # <<<<<<<<<<<<<<
 * 
 * cdef enum: MAX_PLANES = 3
 */
enum  {
  __pyx_e_4cuda_5ccuda_CU_DEVICE_INVALID = -2L
};

/* "cuda/ccuda.pxd":2814
 * cdef enum: CU_DEVICE_INVALID = -2
 * 
 * cdef enum: MAX_PLANES = 3             # <<<<<<<<<<<<<<
 * 
 * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295
 */
enum  {
  __pyx_e_4cuda_5ccuda_MAX_PLANES = 3
};

/* "cuda/ccuda.pxd":2816
 * cdef enum: MAX_PLANES = 3
 * 
 * cdef enum: CUDA_EGL_INFINITE_TIMEOUT = 4294967295             # <<<<<<<<<<<<<<
 */
enum  {
  __pyx_e_4cuda_5ccuda_CUDA_EGL_INFINITE_TIMEOUT = 0xFFFFFFFF
};

/* "cuda/ccuda.pxd":2480
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLImageKHR             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef void *__pyx_t_4cuda_5ccuda_EGLImageKHR;

/* "cuda/ccuda.pxd":2485
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLStreamKHR             # <<<<<<<<<<<<<<
 * 
 * ctypedef unsigned int EGLint
 */
typedef void *__pyx_t_4cuda_5ccuda_EGLStreamKHR;

/* "cuda/ccuda.pxd":2492
 *     cdef struct void:
 *         pass
 * ctypedef void* EGLSyncKHR             # <<<<<<<<<<<<<<
 * 
 * ctypedef uint32_t VdpDevice
 */
typedef void *__pyx_t_4cuda_5ccuda_EGLSyncKHR;

/* "cuda/ccuda.pxd":2515
 *     CU_EGL_FRAME_TYPE_PITCH = 1
 * 
 * ctypedef CUeglFrameType_enum CUeglFrameType             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUeglResourceLocationFlags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUeglFrameType_enum __pyx_t_4cuda_5ccuda_CUeglFrameType;

/* "cuda/ccuda.pxd":2521
 *     CU_EGL_RESOURCE_LOCATION_VIDMEM = 1
 * 
 * ctypedef CUeglResourceLocationFlags_enum CUeglResourceLocationFlags             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUeglColorFormat_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags_enum __pyx_t_4cuda_5ccuda_CUeglResourceLocationFlags;

/* "cuda/ccuda.pxd":2640
 *     CU_EGL_COLOR_FORMAT_MAX = 114
 * 
 * ctypedef CUeglColorFormat_enum CUeglColorFormat             # <<<<<<<<<<<<<<
 * 
 * cdef union _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUeglColorFormat_enum __pyx_t_4cuda_5ccuda_CUeglColorFormat;

/* "cuda/ccuda.pxd":2642
 * ctypedef CUeglColorFormat_enum CUeglColorFormat
 * 
 * cdef union _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u:             # <<<<<<<<<<<<<<
 *     CUarray pArray[3]
 *     void* pPitch[3]
 */
union __pyx_t_4cuda_5ccuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u {
  CUarray pArray[3];
  void *pPitch[3];
};

/* "cuda/ccuda.pxd":2646
 *     void* pPitch[3]
 * 
 * cdef struct CUeglFrame_st:             # <<<<<<<<<<<<<<
 *     _CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u frame
 *     unsigned int width
 */
struct __pyx_t_4cuda_5ccuda_CUeglFrame_st {
  union __pyx_t_4cuda_5ccuda__CUeglFrame_v1_CUeglFrame_v1_CUeglFrame_st_frame_u frame;
  unsigned int width;
  unsigned int height;
  unsigned int depth;
  unsigned int pitch;
  unsigned int planeCount;
  unsigned int numChannels;
  __pyx_t_4cuda_5ccuda_CUeglFrameType frameType;
  __pyx_t_4cuda_5ccuda_CUeglColorFormat eglColorFormat;
  CUarray_format cuFormat;
};

/* "cuda/ccuda.pxd":2658
 *     CUarray_format cuFormat
 * 
 * ctypedef CUeglFrame_st CUeglFrame_v1             # <<<<<<<<<<<<<<
 * 
 * ctypedef CUeglFrame_v1 CUeglFrame
 */
typedef struct __pyx_t_4cuda_5ccuda_CUeglFrame_st __pyx_t_4cuda_5ccuda_CUeglFrame_v1;

/* "cuda/ccuda.pxd":2660
 * ctypedef CUeglFrame_st CUeglFrame_v1
 * 
 * ctypedef CUeglFrame_v1 CUeglFrame             # <<<<<<<<<<<<<<
 * 
 * cdef extern from "":
 */
typedef __pyx_t_4cuda_5ccuda_CUeglFrame_v1 __pyx_t_4cuda_5ccuda_CUeglFrame;

/* "cuda/ccuda.pxd":2665
 *     cdef struct CUeglStreamConnection_st:
 *         pass
 * ctypedef CUeglStreamConnection_st* CUeglStreamConnection             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef struct CUeglStreamConnection_st *__pyx_t_4cuda_5ccuda_CUeglStreamConnection;

/* "cuda/ccuda.pxd":2697
 *     CU_GL_DEVICE_LIST_NEXT_FRAME = 3
 * 
 * ctypedef CUGLDeviceList_enum CUGLDeviceList             # <<<<<<<<<<<<<<
 * 
 * cdef enum CUGLmap_flags_enum:
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLDeviceList_enum __pyx_t_4cuda_5ccuda_CUGLDeviceList;

/* "cuda/ccuda.pxd":2704
 *     CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
 * 
 * ctypedef CUGLmap_flags_enum CUGLmap_flags             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND
 */
typedef enum __pyx_t_4cuda_5ccuda_CUGLmap_flags_enum __pyx_t_4cuda_5ccuda_CUGLmap_flags;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* Profile.proto */
#ifndef CYTHON_PROFILE
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
  #define CYTHON_PROFILE 0
#else
  #define CYTHON_PROFILE 1
#endif
#endif
#ifndef CYTHON_TRACE_NOGIL
  #define CYTHON_TRACE_NOGIL 0
#else
  #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
    #define CYTHON_TRACE 1
  #endif
#endif
#ifndef CYTHON_TRACE
  #define CYTHON_TRACE 0
#endif
#if CYTHON_TRACE
  #undef CYTHON_PROFILE_REUSE_FRAME
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
  #define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE || CYTHON_TRACE
  #include "compile.h"
  #include "frameobject.h"
  #include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #if CYTHON_PROFILE_REUSE_FRAME
    #define CYTHON_FRAME_MODIFIER static
    #define CYTHON_FRAME_DEL(frame)
  #else
    #define CYTHON_FRAME_MODIFIER
    #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
  #endif
  #define __Pyx_TraceDeclarations\
      static PyCodeObject *__pyx_frame_code = NULL;\
      CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
      int __Pyx_use_tracing = 0;
  #define __Pyx_TraceFrameInit(codeobj)\
      if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
#if PY_VERSION_HEX >= 0x030b00a2
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->cframe->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
  #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
#elif PY_VERSION_HEX >= 0x030a00b1
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->cframe->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate)\
      do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
  #define __Pyx_LeaveTracing(tstate)\
      do {\
          tstate->tracing--;\
          tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
                                 || tstate->c_profilefunc != NULL);\
      } while (0)
#else
  #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
     (unlikely((tstate)->use_tracing) &&\
         (!(check_tracing) || !(tstate)->tracing) &&\
         (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
  #define __Pyx_EnterTracing(tstate)\
      do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
  #define __Pyx_LeaveTracing(tstate)\
      do {\
          tstate->tracing--;\
          tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
                                         || tstate->c_profilefunc != NULL);\
      } while (0)
#endif
  #ifdef WITH_THREAD
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  if (nogil) {\
      if (CYTHON_TRACE_NOGIL) {\
          PyThreadState *tstate;\
          PyGILState_STATE state = PyGILState_Ensure();\
          tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 1, 1)) {\
              __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          }\
          PyGILState_Release(state);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  } else {\
      PyThreadState* tstate = PyThreadState_GET();\
      if (__Pyx_IsTracing(tstate, 1, 1)) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #else
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
  {   PyThreadState* tstate = PyThreadState_GET();\
      if (__Pyx_IsTracing(tstate, 1, 1)) {\
          __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
          if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
      }\
  }
  #endif
  #define __Pyx_TraceException()\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 1)) {\
          __Pyx_EnterTracing(tstate);\
          PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
          if (exc_info) {\
              if (CYTHON_TRACE && tstate->c_tracefunc)\
                  tstate->c_tracefunc(\
                      tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              tstate->c_profilefunc(\
                  tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
              Py_DECREF(exc_info);\
          }\
          __Pyx_LeaveTracing(tstate);\
      }\
  }
  static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      __Pyx_EnterTracing(tstate);
      if (CYTHON_TRACE && tstate->c_tracefunc)
          tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
      if (tstate->c_profilefunc)
          tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
      CYTHON_FRAME_DEL(frame);
      __Pyx_LeaveTracing(tstate);
      __Pyx_ErrRestoreInState(tstate, type, value, traceback);
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (__Pyx_IsTracing(tstate, 0, 0)) {\
                  __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
              }\
              PyGILState_Release(state);\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 0, 0)) {\
              __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
          }\
      }\
  }
  #else
  #define __Pyx_TraceReturn(result, nogil)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 0)) {\
          __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
      }\
  }
  #endif
  static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
  static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
#else
  #define __Pyx_TraceDeclarations
  #define __Pyx_TraceFrameInit(codeobj)
  #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)   if ((1)); else goto_error;
  #define __Pyx_TraceException()
  #define __Pyx_TraceReturn(result, nogil)
#endif
#if CYTHON_TRACE
  static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
      int ret;
      PyObject *type, *value, *traceback;
      __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
      __Pyx_PyFrame_SetLineNumber(frame, lineno);
      __Pyx_EnterTracing(tstate);
      ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
      __Pyx_LeaveTracing(tstate);
      if (likely(!ret)) {
          __Pyx_ErrRestoreInState(tstate, type, value, traceback);
      } else {
          Py_XDECREF(type);
          Py_XDECREF(value);
          Py_XDECREF(traceback);
      }
      return ret;
  }
  #ifdef WITH_THREAD
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      if (nogil) {\
          if (CYTHON_TRACE_NOGIL) {\
              int ret = 0;\
              PyThreadState *tstate;\
              PyGILState_STATE state = PyGILState_Ensure();\
              tstate = __Pyx_PyThreadState_Current;\
              if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
                  ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              }\
              PyGILState_Release(state);\
              if (unlikely(ret)) goto_error;\
          }\
      } else {\
          PyThreadState* tstate = __Pyx_PyThreadState_Current;\
          if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
              int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
              if (unlikely(ret)) goto_error;\
          }\
      }\
  }
  #else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)\
  if (likely(!__Pyx_use_tracing)); else {\
      PyThreadState* tstate = __Pyx_PyThreadState_Current;\
      if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
          int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
          if (unlikely(ret)) goto_error;\
      }\
  }
  #endif
#else
  #define __Pyx_TraceLine(lineno, nogil, goto_error)   if ((1)); else goto_error;
#endif

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* None.proto */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); /* proto */

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

/* FunctionExport.proto */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig);

/* FunctionImport.proto */
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);


/* Module declarations from 'libc.stdint' */

/* Module declarations from 'cuda._cuda.ccuda' */
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorString)(CUresult, char const **); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorName)(CUresult, char const **); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuInit)(unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDriverGetVersion)(int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet)(CUdevice *, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount)(int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName)(char *, int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid)(CUuuid *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid_v2)(CUuuid *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetLuid)(char *, unsigned int *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2)(size_t *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetTexture1DLinearMaxWidth)(size_t *, CUarray_format, unsigned int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute)(int *, CUdevice_attribute, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetNvSciSyncAttributes)(void *, CUdevice, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetMemPool)(CUdevice, CUmemoryPool); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetMemPool)(CUmemoryPool *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDefaultMemPool)(CUmemoryPool *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuFlushGPUDirectRDMAWrites)(CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetProperties)(CUdevprop *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceComputeCapability)(int *, int *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain)(CUcontext *, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRelease_v2)(CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxSetFlags_v2)(CUdevice, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxGetState)(CUdevice, unsigned int *, int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxReset_v2)(CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport)(int *, CUexecAffinityType, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v2)(CUcontext *, unsigned int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v3)(CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDestroy_v2)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPushCurrent_v2)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPopCurrent_v2)(CUcontext *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent)(CUcontext *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevice)(CUdevice *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetFlags)(unsigned int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSynchronize)(void); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetLimit)(CUlimit, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetLimit)(size_t *, CUlimit); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCacheConfig)(CUfunc_cache *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCacheConfig)(CUfunc_cache); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetSharedMemConfig)(CUsharedconfig *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig)(CUsharedconfig); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetApiVersion)(CUcontext, unsigned int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetStreamPriorityRange)(int *, int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxResetPersistingL2Cache)(void); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetExecAffinity)(CUexecAffinityParam *, CUexecAffinityType); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxAttach)(CUcontext *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDetach)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoad)(CUmodule *, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadData)(CUmodule *, void const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadDataEx)(CUmodule *, void const *, unsigned int, CUjit_option *, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadFatBinary)(CUmodule *, void const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleUnload)(CUmodule); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetLoadingMode)(CUmoduleLoadingMode *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction)(CUfunction *, CUmodule, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetGlobal_v2)(CUdeviceptr *, size_t *, CUmodule, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetTexRef)(CUtexref *, CUmodule, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef)(CUsurfref *, CUmodule, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLinkCreate_v2)(unsigned int, CUjit_option *, void **, CUlinkState *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddData_v2)(CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddFile_v2)(CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLinkComplete)(CUlinkState, void **, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLinkDestroy)(CUlinkState); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetInfo_v2)(size_t *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAlloc_v2)(CUdeviceptr *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2)(CUdeviceptr *, size_t *, size_t, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemFree_v2)(CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAddressRange_v2)(CUdeviceptr *, size_t *, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocHost_v2)(void **, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeHost)(void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc)(void **, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetDevicePointer_v2)(CUdeviceptr *, void *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetFlags)(unsigned int *, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocManaged)(CUdeviceptr *, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetByPCIBusId)(CUdevice *, char const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetPCIBusId)(char *, int, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetEventHandle)(CUipcEventHandle *, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenEventHandle)(CUevent *, CUipcEventHandle); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetMemHandle)(CUipcMemHandle *, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenMemHandle_v2)(CUdeviceptr *, CUipcMemHandle, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuIpcCloseMemHandle)(CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostRegister_v2)(void *, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostUnregister)(void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy)(CUdeviceptr, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeer)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2)(CUdeviceptr, void const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2)(void *, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2)(CUdeviceptr, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoA_v2)(CUarray, size_t, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoD_v2)(CUdeviceptr, CUarray, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoA_v2)(CUarray, size_t, void const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoH_v2)(void *, CUarray, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoA_v2)(CUarray, size_t, CUarray, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2D_v2)(CUDA_MEMCPY2D const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2)(CUDA_MEMCPY2D const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2)(CUDA_MEMCPY3D const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer)(CUDA_MEMCPY3D_PEER const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync)(CUdeviceptr, CUdeviceptr, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeerAsync)(CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2)(CUdeviceptr, void const *, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2)(void *, CUdeviceptr, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2)(CUdeviceptr, CUdeviceptr, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoAAsync_v2)(CUarray, size_t, void const *, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoHAsync_v2)(void *, CUarray, size_t, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2)(CUDA_MEMCPY2D const *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2)(CUDA_MEMCPY3D const *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync)(CUDA_MEMCPY3D_PEER const *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2)(CUdeviceptr, unsigned char, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16_v2)(CUdeviceptr, unsigned short, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32_v2)(CUdeviceptr, unsigned int, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2)(CUdeviceptr, size_t, unsigned char, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16_v2)(CUdeviceptr, size_t, unsigned short, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32_v2)(CUdeviceptr, size_t, unsigned int, size_t, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async)(CUdeviceptr, unsigned char, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16Async)(CUdeviceptr, unsigned short, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32Async)(CUdeviceptr, unsigned int, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async)(CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16Async)(CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32Async)(CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArrayCreate_v2)(CUarray *, CUDA_ARRAY_DESCRIPTOR const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetDescriptor_v2)(CUDA_ARRAY_DESCRIPTOR *, CUarray); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetSparseProperties)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetSparseProperties)(CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetMemoryRequirements)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetMemoryRequirements)(CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetPlane)(CUarray *, CUarray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArrayDestroy)(CUarray); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2)(CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2)(CUDA_ARRAY3D_DESCRIPTOR *, CUarray); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate)(CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel)(CUarray *, CUmipmappedArray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayDestroy)(CUmipmappedArray); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetHandleForAddressRange)(void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressReserve)(CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressFree)(CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemCreate)(CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemRelease)(CUmemGenericAllocationHandle); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemMap)(CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemMapArrayAsync)(CUarrayMapInfo *, unsigned int, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap)(CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess)(CUdeviceptr, size_t, CUmemAccessDesc const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAccess)(unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle)(void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemImportFromShareableHandle)(CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity)(size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle)(CUmemAllocationProp *, CUmemGenericAllocationHandle); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle)(CUmemGenericAllocationHandle *, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync)(CUdeviceptr, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync)(CUdeviceptr *, size_t, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo)(CUmemoryPool, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute)(CUmemoryPool, CUmemPool_attribute, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute)(CUmemoryPool, CUmemPool_attribute, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess)(CUmemoryPool, CUmemAccessDesc const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAccess)(CUmemAccess_flags *, CUmemoryPool, CUmemLocation *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate)(CUmemoryPool *, CUmemPoolProps const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy)(CUmemoryPool); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync)(CUdeviceptr *, size_t, CUmemoryPool, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle)(void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportFromShareableHandle)(CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportPointer)(CUmemPoolPtrExportData *, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer)(CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute)(void *, CUpointer_attribute, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync)(CUdeviceptr, size_t, CUdevice, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise)(CUdeviceptr, size_t, CUmem_advise, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute)(void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes)(void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute)(void const *, CUpointer_attribute, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes)(unsigned int, CUpointer_attribute *, void **, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate)(CUstream *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority)(CUstream *, unsigned int, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetPriority)(CUstream, int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags)(CUstream, unsigned int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx)(CUstream, CUcontext *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent)(CUstream, CUevent, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback)(CUstream, CUstreamCallback, void *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCapture_v2)(CUstream, CUstreamCaptureMode); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode)(CUstreamCaptureMode *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture)(CUstream, CUgraph *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing)(CUstream, CUstreamCaptureStatus *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo)(CUstream, CUstreamCaptureStatus *, cuuint64_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2)(CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies)(CUstream, CUgraphNode *, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAttachMemAsync)(CUstream, CUdeviceptr, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamQuery)(CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize)(CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2)(CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes)(CUstream, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute)(CUstream, CUstreamAttrID, CUstreamAttrValue *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute)(CUstream, CUstreamAttrID, CUstreamAttrValue const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate)(CUevent *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord)(CUevent, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags)(CUevent, CUstream, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery)(CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize)(CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2)(CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime)(float *, CUevent, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory)(CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedBuffer)(CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedMipmappedArray)(CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalMemory)(CUexternalMemory); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore)(CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuSignalExternalSemaphoresAsync)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync)(CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore)(CUexternalSemaphore); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp)(CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32_v2)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64_v2)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32_v2)(CUstream, CUdeviceptr, cuuint32_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64_v2)(CUstream, CUdeviceptr, cuuint64_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp_v2)(CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute)(int *, CUfunction_attribute, CUfunction); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute)(CUfunction, CUfunction_attribute, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig)(CUfunction, CUfunc_cache); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig)(CUfunction, CUsharedconfig); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule)(CUmodule *, CUfunction); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernelEx)(CUlaunchConfig const *, CUfunction, void **, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel)(CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice)(CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchHostFunc)(CUstream, CUhostFn, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape)(CUfunction, int, int, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedSize)(CUfunction, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize)(CUfunction, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti)(CUfunction, int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetf)(CUfunction, int, float); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv)(CUfunction, int, void *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLaunch)(CUfunction); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid)(CUfunction, int, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync)(CUfunction, int, int, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef)(CUfunction, int, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate)(CUgraph *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams)(CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemcpyNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams)(CUgraphNode, CUDA_MEMCPY3D *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams)(CUgraphNode, CUDA_MEMCPY3D const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeSetParams)(CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddHostNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeGetParams)(CUgraphNode, CUDA_HOST_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeSetParams)(CUgraphNode, CUDA_HOST_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddChildGraphNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph)(CUgraphNode, CUgraph *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventRecordNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent)(CUgraphNode, CUevent *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent)(CUgraphNode, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent)(CUgraphNode, CUevent *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent)(CUgraphNode, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeGetParams)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeSetParams)(CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresWaitNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeGetParams)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeSetParams)(CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddBatchMemOpNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeGetParams)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeSetParams)(CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecBatchMemOpNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemAllocNodeGetParams)(CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemFreeNode)(CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams)(CUgraphNode, CUdeviceptr *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim)(CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute)(CUdevice, CUgraphMem_attribute, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute)(CUdevice, CUgraphMem_attribute, void *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone)(CUgraph *, CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone)(CUgraphNode *, CUgraphNode, CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType)(CUgraphNode, CUgraphNodeType *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes)(CUgraph, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes)(CUgraph, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges)(CUgraph, CUgraphNode *, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies)(CUgraphNode, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes)(CUgraphNode, CUgraphNode *, size_t *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies)(CUgraph, CUgraphNode const *, CUgraphNode const *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroyNode)(CUgraphNode); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiate_v2)(CUgraphExec *, CUgraph, CUgraphNode *, char *, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithFlags)(CUgraphExec *, CUgraph, unsigned PY_LONG_LONG); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemcpyNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecChildGraphNodeSetParams)(CUgraphExec, CUgraphNode, CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent)(CUgraphExec, CUgraphNode, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent)(CUgraphExec, CUgraphNode, CUevent); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresWaitNodeSetParams)(CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetEnabled)(CUgraphExec, CUgraphNode, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled)(CUgraphExec, CUgraphNode, unsigned int *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload)(CUgraphExec, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch)(CUgraphExec, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy)(CUgraphExec); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy)(CUgraph); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate)(CUgraphExec, CUgraph, CUgraphNode *, CUgraphExecUpdateResult *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes)(CUgraphNode, CUgraphNode); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute)(CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint)(CUgraph, char const *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectCreate)(CUuserObject *, void *, CUhostFn, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRetain)(CUuserObject, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease)(CUuserObject, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject)(CUgraph, CUuserObject, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphReleaseUserObject)(CUgraph, CUuserObject, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor)(int *, CUfunction, int, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags)(int *, CUfunction, int, size_t, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSize)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSizeWithFlags)(int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyAvailableDynamicSMemPerBlock)(size_t *, CUfunction, int, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialClusterSize)(int *, CUfunction, CUlaunchConfig const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveClusters)(int *, CUfunction, CUlaunchConfig const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray)(CUtexref, CUarray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray)(CUtexref, CUmipmappedArray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress_v2)(size_t *, CUtexref, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress2D_v3)(CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat)(CUtexref, CUarray_format, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode)(CUtexref, int, CUaddress_mode); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode)(CUtexref, CUfilter_mode); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode)(CUtexref, CUfilter_mode); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias)(CUtexref, float); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp)(CUtexref, float, float); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy)(CUtexref, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor)(CUtexref, float *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags)(CUtexref, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddress_v2)(CUdeviceptr *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray)(CUarray *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray)(CUmipmappedArray *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode)(CUaddress_mode *, CUtexref, int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode)(CUfilter_mode *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat)(CUarray_format *, int *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode)(CUfilter_mode *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias)(float *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp)(float *, float *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy)(int *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor)(float *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags)(unsigned int *, CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate)(CUtexref *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy)(CUtexref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray)(CUsurfref, CUarray, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray)(CUarray *, CUsurfref); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate)(CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectDestroy)(CUtexObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc)(CUDA_RESOURCE_DESC *, CUtexObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc)(CUDA_TEXTURE_DESC *, CUtexObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc)(CUDA_RESOURCE_VIEW_DESC *, CUtexObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate)(CUsurfObject *, CUDA_RESOURCE_DESC const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectDestroy)(CUsurfObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc)(CUDA_RESOURCE_DESC *, CUsurfObject); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer)(int *, CUdevice, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess)(CUcontext, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess)(CUcontext); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute)(int *, CUdevice_P2PAttribute, CUdevice, CUdevice); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource)(CUgraphicsResource); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray)(CUarray *, CUgraphicsResource, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedMipmappedArray)(CUmipmappedArray *, CUgraphicsResource); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2)(CUdeviceptr *, size_t *, CUgraphicsResource); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2)(CUgraphicsResource, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources)(unsigned int, CUgraphicsResource *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources)(unsigned int, CUgraphicsResource *, CUstream); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress)(char const *, void **, int, cuuint64_t); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable)(void const **, CUuuid const *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerInitialize)(char const *, char const *, CUoutput_mode); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart)(void); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop)(void); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice)(CUdevice *, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUCtxCreate_v2)(CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterVideoSurface)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpVideoSurface, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterOutputSurface)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpOutputSurface, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsEGLRegisterImage)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_EGLImageKHR, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnect)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnectWithFlags)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerDisconnect)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerAcquireFrame)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource, CUstream *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerConnect)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, __pyx_t_4cuda_5ccuda_EGLint, __pyx_t_4cuda_5ccuda_EGLint); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerDisconnect)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerPresentFrame)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, CUstream *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame)(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, CUstream *); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame)(__pyx_t_4cuda_5ccuda_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreateFromEGLSync)(CUevent *, __pyx_t_4cuda_5ccuda_EGLSyncKHR, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterBuffer)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterImage)(CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, __pyx_t_4cuda_5ccuda_GLenum, unsigned int); /*proto*/
static CUresult (*__pyx_f_4cuda_5_cuda_5ccuda__cuGLGetDevices_v2)(unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_5ccuda_CUGLDeviceList); /*proto*/

/* Module declarations from 'cuda.ccuda' */
#define __Pyx_MODULE_NAME "cuda.ccuda"
extern int __pyx_module_is_main_cuda__ccuda;
int __pyx_module_is_main_cuda__ccuda = 0;

/* Implementation of 'cuda.ccuda' */
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_test;
/* Late includes */

/* "cuda/ccuda.pyx":10
 * cimport cuda._cuda.ccuda as ccuda
 * 
 * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetErrorString(error, pStr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGetErrorString(CUresult __pyx_v_error, char const **__pyx_v_pStr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGetErrorString", __pyx_f[0], 10, 1, __PYX_ERR(0, 10, __pyx_L1_error));

  /* "cuda/ccuda.pyx":11
 * 
 * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGetErrorString(error, pStr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorString(__pyx_v_error, __pyx_v_pStr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 11, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":10
 * cimport cuda._cuda.ccuda as ccuda
 * 
 * cdef CUresult cuGetErrorString(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetErrorString(error, pStr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGetErrorString", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":13
 *     return ccuda._cuGetErrorString(error, pStr)
 * 
 * cdef CUresult cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetErrorName(error, pStr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGetErrorName(CUresult __pyx_v_error, char const **__pyx_v_pStr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGetErrorName", __pyx_f[0], 13, 1, __PYX_ERR(0, 13, __pyx_L1_error));

  /* "cuda/ccuda.pyx":14
 * 
 * cdef CUresult cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGetErrorName(error, pStr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorName(__pyx_v_error, __pyx_v_pStr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 14, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":13
 *     return ccuda._cuGetErrorString(error, pStr)
 * 
 * cdef CUresult cuGetErrorName(CUresult error, const char** pStr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetErrorName(error, pStr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGetErrorName", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":16
 *     return ccuda._cuGetErrorName(error, pStr)
 * 
 * cdef CUresult cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuInit(Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuInit(unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuInit", __pyx_f[0], 16, 1, __PYX_ERR(0, 16, __pyx_L1_error));

  /* "cuda/ccuda.pyx":17
 * 
 * cdef CUresult cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuInit(Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuInit(__pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 17, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":16
 *     return ccuda._cuGetErrorName(error, pStr)
 * 
 * cdef CUresult cuInit(unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuInit(Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuInit", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":19
 *     return ccuda._cuInit(Flags)
 * 
 * cdef CUresult cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDriverGetVersion(driverVersion)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDriverGetVersion(int *__pyx_v_driverVersion) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDriverGetVersion", __pyx_f[0], 19, 1, __PYX_ERR(0, 19, __pyx_L1_error));

  /* "cuda/ccuda.pyx":20
 * 
 * cdef CUresult cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDriverGetVersion(driverVersion)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDriverGetVersion(__pyx_v_driverVersion); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 20, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":19
 *     return ccuda._cuInit(Flags)
 * 
 * cdef CUresult cuDriverGetVersion(int* driverVersion) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDriverGetVersion(driverVersion)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDriverGetVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":22
 *     return ccuda._cuDriverGetVersion(driverVersion)
 * 
 * cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGet(device, ordinal)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGet(CUdevice *__pyx_v_device, int __pyx_v_ordinal) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGet", __pyx_f[0], 22, 1, __PYX_ERR(0, 22, __pyx_L1_error));

  /* "cuda/ccuda.pyx":23
 * 
 * cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGet(device, ordinal)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet(__pyx_v_device, __pyx_v_ordinal); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 23, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":22
 *     return ccuda._cuDriverGetVersion(driverVersion)
 * 
 * cdef CUresult cuDeviceGet(CUdevice* device, int ordinal) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGet(device, ordinal)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGet", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":25
 *     return ccuda._cuDeviceGet(device, ordinal)
 * 
 * cdef CUresult cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetCount(count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetCount(int *__pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetCount", __pyx_f[0], 25, 1, __PYX_ERR(0, 25, __pyx_L1_error));

  /* "cuda/ccuda.pyx":26
 * 
 * cdef CUresult cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetCount(count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount(__pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 26, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":25
 *     return ccuda._cuDeviceGet(device, ordinal)
 * 
 * cdef CUresult cuDeviceGetCount(int* count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetCount(count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetCount", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":28
 *     return ccuda._cuDeviceGetCount(count)
 * 
 * cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetName(name, length, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetName(char *__pyx_v_name, int __pyx_v_length, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetName", __pyx_f[0], 28, 1, __PYX_ERR(0, 28, __pyx_L1_error));

  /* "cuda/ccuda.pyx":29
 * 
 * cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetName(name, length, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName(__pyx_v_name, __pyx_v_length, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 29, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":28
 *     return ccuda._cuDeviceGetCount(count)
 * 
 * cdef CUresult cuDeviceGetName(char* name, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetName(name, length, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetName", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":31
 *     return ccuda._cuDeviceGetName(name, length, dev)
 * 
 * cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetUuid(uuid, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetUuid(CUuuid *__pyx_v_uuid, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetUuid", __pyx_f[0], 31, 1, __PYX_ERR(0, 31, __pyx_L1_error));

  /* "cuda/ccuda.pyx":32
 * 
 * cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetUuid(uuid, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid(__pyx_v_uuid, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 32, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":31
 *     return ccuda._cuDeviceGetName(name, length, dev)
 * 
 * cdef CUresult cuDeviceGetUuid(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetUuid(uuid, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetUuid", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":34
 *     return ccuda._cuDeviceGetUuid(uuid, dev)
 * 
 * cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetUuid_v2(uuid, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetUuid_v2(CUuuid *__pyx_v_uuid, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetUuid_v2", __pyx_f[0], 34, 1, __PYX_ERR(0, 34, __pyx_L1_error));

  /* "cuda/ccuda.pyx":35
 * 
 * cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetUuid_v2(uuid, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid_v2(__pyx_v_uuid, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 35, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":34
 *     return ccuda._cuDeviceGetUuid(uuid, dev)
 * 
 * cdef CUresult cuDeviceGetUuid_v2(CUuuid* uuid, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetUuid_v2(uuid, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetUuid_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":37
 *     return ccuda._cuDeviceGetUuid_v2(uuid, dev)
 * 
 * cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetLuid(luid, deviceNodeMask, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetLuid(char *__pyx_v_luid, unsigned int *__pyx_v_deviceNodeMask, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetLuid", __pyx_f[0], 37, 1, __PYX_ERR(0, 37, __pyx_L1_error));

  /* "cuda/ccuda.pyx":38
 * 
 * cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetLuid(luid, deviceNodeMask, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetLuid(__pyx_v_luid, __pyx_v_deviceNodeMask, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 38, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":37
 *     return ccuda._cuDeviceGetUuid_v2(uuid, dev)
 * 
 * cdef CUresult cuDeviceGetLuid(char* luid, unsigned int* deviceNodeMask, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetLuid(luid, deviceNodeMask, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetLuid", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":40
 *     return ccuda._cuDeviceGetLuid(luid, deviceNodeMask, dev)
 * 
 * cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceTotalMem_v2(numbytes, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceTotalMem(size_t *__pyx_v_numbytes, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceTotalMem", __pyx_f[0], 40, 1, __PYX_ERR(0, 40, __pyx_L1_error));

  /* "cuda/ccuda.pyx":41
 * 
 * cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceTotalMem_v2(numbytes, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2(__pyx_v_numbytes, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 41, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":40
 *     return ccuda._cuDeviceGetLuid(luid, deviceNodeMask, dev)
 * 
 * cdef CUresult cuDeviceTotalMem(size_t* numbytes, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceTotalMem_v2(numbytes, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceTotalMem", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":43
 *     return ccuda._cuDeviceTotalMem_v2(numbytes, dev)
 * 
 * cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetTexture1DLinearMaxWidth(size_t *__pyx_v_maxWidthInElements, CUarray_format __pyx_v_pformat, unsigned int __pyx_v_numChannels, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetTexture1DLinearMaxWidth", __pyx_f[0], 43, 1, __PYX_ERR(0, 43, __pyx_L1_error));

  /* "cuda/ccuda.pyx":44
 * 
 * cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetTexture1DLinearMaxWidth(__pyx_v_maxWidthInElements, __pyx_v_pformat, __pyx_v_numChannels, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 44, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":43
 *     return ccuda._cuDeviceTotalMem_v2(numbytes, dev)
 * 
 * cdef CUresult cuDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, CUarray_format pformat, unsigned numChannels, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetTexture1DLinearMaxWidth", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":46
 *     return ccuda._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev)
 * 
 * cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetAttribute(pi, attrib, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetAttribute(int *__pyx_v_pi, CUdevice_attribute __pyx_v_attrib, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetAttribute", __pyx_f[0], 46, 1, __PYX_ERR(0, 46, __pyx_L1_error));

  /* "cuda/ccuda.pyx":47
 * 
 * cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetAttribute(pi, attrib, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute(__pyx_v_pi, __pyx_v_attrib, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 47, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":46
 *     return ccuda._cuDeviceGetTexture1DLinearMaxWidth(maxWidthInElements, pformat, numChannels, dev)
 * 
 * cdef CUresult cuDeviceGetAttribute(int* pi, CUdevice_attribute attrib, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetAttribute(pi, attrib, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":49
 *     return ccuda._cuDeviceGetAttribute(pi, attrib, dev)
 * 
 * cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetNvSciSyncAttributes(void *__pyx_v_nvSciSyncAttrList, CUdevice __pyx_v_dev, int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetNvSciSyncAttributes", __pyx_f[0], 49, 1, __PYX_ERR(0, 49, __pyx_L1_error));

  /* "cuda/ccuda.pyx":50
 * 
 * cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetNvSciSyncAttributes(__pyx_v_nvSciSyncAttrList, __pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 50, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":49
 *     return ccuda._cuDeviceGetAttribute(pi, attrib, dev)
 * 
 * cdef CUresult cuDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, CUdevice dev, int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetNvSciSyncAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":52
 *     return ccuda._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags)
 * 
 * cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceSetMemPool(dev, pool)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceSetMemPool(CUdevice __pyx_v_dev, CUmemoryPool __pyx_v_pool) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceSetMemPool", __pyx_f[0], 52, 1, __PYX_ERR(0, 52, __pyx_L1_error));

  /* "cuda/ccuda.pyx":53
 * 
 * cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceSetMemPool(dev, pool)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetMemPool(__pyx_v_dev, __pyx_v_pool); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 53, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":52
 *     return ccuda._cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, flags)
 * 
 * cdef CUresult cuDeviceSetMemPool(CUdevice dev, CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceSetMemPool(dev, pool)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceSetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":55
 *     return ccuda._cuDeviceSetMemPool(dev, pool)
 * 
 * cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetMemPool(pool, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetMemPool(CUmemoryPool *__pyx_v_pool, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetMemPool", __pyx_f[0], 55, 1, __PYX_ERR(0, 55, __pyx_L1_error));

  /* "cuda/ccuda.pyx":56
 * 
 * cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetMemPool(pool, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetMemPool(__pyx_v_pool, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 56, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":55
 *     return ccuda._cuDeviceSetMemPool(dev, pool)
 * 
 * cdef CUresult cuDeviceGetMemPool(CUmemoryPool* pool, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetMemPool(pool, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":58
 *     return ccuda._cuDeviceGetMemPool(pool, dev)
 * 
 * cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetDefaultMemPool(pool_out, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetDefaultMemPool(CUmemoryPool *__pyx_v_pool_out, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetDefaultMemPool", __pyx_f[0], 58, 1, __PYX_ERR(0, 58, __pyx_L1_error));

  /* "cuda/ccuda.pyx":59
 * 
 * cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetDefaultMemPool(pool_out, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDefaultMemPool(__pyx_v_pool_out, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 59, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":58
 *     return ccuda._cuDeviceGetMemPool(pool, dev)
 * 
 * cdef CUresult cuDeviceGetDefaultMemPool(CUmemoryPool* pool_out, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetDefaultMemPool(pool_out, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetDefaultMemPool", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":61
 *     return ccuda._cuDeviceGetDefaultMemPool(pool_out, dev)
 * 
 * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFlushGPUDirectRDMAWrites(target, scope)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget __pyx_v_target, CUflushGPUDirectRDMAWritesScope __pyx_v_scope) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuFlushGPUDirectRDMAWrites", __pyx_f[0], 61, 1, __PYX_ERR(0, 61, __pyx_L1_error));

  /* "cuda/ccuda.pyx":62
 * 
 * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuFlushGPUDirectRDMAWrites(target, scope)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFlushGPUDirectRDMAWrites(__pyx_v_target, __pyx_v_scope); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 62, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":61
 *     return ccuda._cuDeviceGetDefaultMemPool(pool_out, dev)
 * 
 * cdef CUresult cuFlushGPUDirectRDMAWrites(CUflushGPUDirectRDMAWritesTarget target, CUflushGPUDirectRDMAWritesScope scope) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFlushGPUDirectRDMAWrites(target, scope)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuFlushGPUDirectRDMAWrites", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":64
 *     return ccuda._cuFlushGPUDirectRDMAWrites(target, scope)
 * 
 * cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetProperties(prop, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetProperties(CUdevprop *__pyx_v_prop, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetProperties", __pyx_f[0], 64, 1, __PYX_ERR(0, 64, __pyx_L1_error));

  /* "cuda/ccuda.pyx":65
 * 
 * cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetProperties(prop, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetProperties(__pyx_v_prop, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 65, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":64
 *     return ccuda._cuFlushGPUDirectRDMAWrites(target, scope)
 * 
 * cdef CUresult cuDeviceGetProperties(CUdevprop* prop, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetProperties(prop, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":67
 *     return ccuda._cuDeviceGetProperties(prop, dev)
 * 
 * cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceComputeCapability(major, minor, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceComputeCapability(int *__pyx_v_major, int *__pyx_v_minor, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceComputeCapability", __pyx_f[0], 67, 1, __PYX_ERR(0, 67, __pyx_L1_error));

  /* "cuda/ccuda.pyx":68
 * 
 * cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceComputeCapability(major, minor, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceComputeCapability(__pyx_v_major, __pyx_v_minor, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 68, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":67
 *     return ccuda._cuDeviceGetProperties(prop, dev)
 * 
 * cdef CUresult cuDeviceComputeCapability(int* major, int* minor, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceComputeCapability(major, minor, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceComputeCapability", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":70
 *     return ccuda._cuDeviceComputeCapability(major, minor, dev)
 * 
 * cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxRetain(pctx, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRetain(CUcontext *__pyx_v_pctx, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDevicePrimaryCtxRetain", __pyx_f[0], 70, 1, __PYX_ERR(0, 70, __pyx_L1_error));

  /* "cuda/ccuda.pyx":71
 * 
 * cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDevicePrimaryCtxRetain(pctx, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain(__pyx_v_pctx, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 71, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":70
 *     return ccuda._cuDeviceComputeCapability(major, minor, dev)
 * 
 * cdef CUresult cuDevicePrimaryCtxRetain(CUcontext* pctx, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxRetain(pctx, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDevicePrimaryCtxRetain", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":73
 *     return ccuda._cuDevicePrimaryCtxRetain(pctx, dev)
 * 
 * cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxRelease_v2(dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRelease(CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDevicePrimaryCtxRelease", __pyx_f[0], 73, 1, __PYX_ERR(0, 73, __pyx_L1_error));

  /* "cuda/ccuda.pyx":74
 * 
 * cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDevicePrimaryCtxRelease_v2(dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRelease_v2(__pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 74, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":73
 *     return ccuda._cuDevicePrimaryCtxRetain(pctx, dev)
 * 
 * cdef CUresult cuDevicePrimaryCtxRelease(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxRelease_v2(dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDevicePrimaryCtxRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":76
 *     return ccuda._cuDevicePrimaryCtxRelease_v2(dev)
 * 
 * cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxSetFlags_v2(dev, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxSetFlags(CUdevice __pyx_v_dev, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDevicePrimaryCtxSetFlags", __pyx_f[0], 76, 1, __PYX_ERR(0, 76, __pyx_L1_error));

  /* "cuda/ccuda.pyx":77
 * 
 * cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDevicePrimaryCtxSetFlags_v2(dev, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxSetFlags_v2(__pyx_v_dev, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 77, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":76
 *     return ccuda._cuDevicePrimaryCtxRelease_v2(dev)
 * 
 * cdef CUresult cuDevicePrimaryCtxSetFlags(CUdevice dev, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxSetFlags_v2(dev, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDevicePrimaryCtxSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":79
 *     return ccuda._cuDevicePrimaryCtxSetFlags_v2(dev, flags)
 * 
 * cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxGetState(dev, flags, active)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxGetState(CUdevice __pyx_v_dev, unsigned int *__pyx_v_flags, int *__pyx_v_active) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDevicePrimaryCtxGetState", __pyx_f[0], 79, 1, __PYX_ERR(0, 79, __pyx_L1_error));

  /* "cuda/ccuda.pyx":80
 * 
 * cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDevicePrimaryCtxGetState(dev, flags, active)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxGetState(__pyx_v_dev, __pyx_v_flags, __pyx_v_active); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 80, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":79
 *     return ccuda._cuDevicePrimaryCtxSetFlags_v2(dev, flags)
 * 
 * cdef CUresult cuDevicePrimaryCtxGetState(CUdevice dev, unsigned int* flags, int* active) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxGetState(dev, flags, active)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDevicePrimaryCtxGetState", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":82
 *     return ccuda._cuDevicePrimaryCtxGetState(dev, flags, active)
 * 
 * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxReset_v2(dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxReset(CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDevicePrimaryCtxReset", __pyx_f[0], 82, 1, __PYX_ERR(0, 82, __pyx_L1_error));

  /* "cuda/ccuda.pyx":83
 * 
 * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDevicePrimaryCtxReset_v2(dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxReset_v2(__pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 83, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":82
 *     return ccuda._cuDevicePrimaryCtxGetState(dev, flags, active)
 * 
 * cdef CUresult cuDevicePrimaryCtxReset(CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDevicePrimaryCtxReset_v2(dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDevicePrimaryCtxReset", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":85
 *     return ccuda._cuDevicePrimaryCtxReset_v2(dev)
 * 
 * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetExecAffinitySupport(pi, typename, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetExecAffinitySupport(int *__pyx_v_pi, CUexecAffinityType __pyx_v_typename, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetExecAffinitySupport", __pyx_f[0], 85, 1, __PYX_ERR(0, 85, __pyx_L1_error));

  /* "cuda/ccuda.pyx":86
 * 
 * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetExecAffinitySupport(pi, typename, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport(__pyx_v_pi, __pyx_v_typename, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 86, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":85
 *     return ccuda._cuDevicePrimaryCtxReset_v2(dev)
 * 
 * cdef CUresult cuDeviceGetExecAffinitySupport(int* pi, CUexecAffinityType typename, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetExecAffinitySupport(pi, typename, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetExecAffinitySupport", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":88
 *     return ccuda._cuDeviceGetExecAffinitySupport(pi, typename, dev)
 * 
 * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxCreate_v2(pctx, flags, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxCreate(CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxCreate", __pyx_f[0], 88, 1, __PYX_ERR(0, 88, __pyx_L1_error));

  /* "cuda/ccuda.pyx":89
 * 
 * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxCreate_v2(pctx, flags, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v2(__pyx_v_pctx, __pyx_v_flags, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":88
 *     return ccuda._cuDeviceGetExecAffinitySupport(pi, typename, dev)
 * 
 * cdef CUresult cuCtxCreate(CUcontext* pctx, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxCreate_v2(pctx, flags, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":91
 *     return ccuda._cuCtxCreate_v2(pctx, flags, dev)
 * 
 * cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxCreate_v3(CUcontext *__pyx_v_pctx, CUexecAffinityParam *__pyx_v_paramsArray, int __pyx_v_numParams, unsigned int __pyx_v_flags, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxCreate_v3", __pyx_f[0], 91, 1, __PYX_ERR(0, 91, __pyx_L1_error));

  /* "cuda/ccuda.pyx":92
 * 
 * cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxDestroy(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v3(__pyx_v_pctx, __pyx_v_paramsArray, __pyx_v_numParams, __pyx_v_flags, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 92, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":91
 *     return ccuda._cuCtxCreate_v2(pctx, flags, dev)
 * 
 * cdef CUresult cuCtxCreate_v3(CUcontext* pctx, CUexecAffinityParam* paramsArray, int numParams, unsigned int flags, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxCreate_v3", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":94
 *     return ccuda._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev)
 * 
 * cdef CUresult cuCtxDestroy(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxDestroy_v2(ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxDestroy(CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxDestroy", __pyx_f[0], 94, 1, __PYX_ERR(0, 94, __pyx_L1_error));

  /* "cuda/ccuda.pyx":95
 * 
 * cdef CUresult cuCtxDestroy(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxDestroy_v2(ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxPushCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDestroy_v2(__pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 95, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":94
 *     return ccuda._cuCtxCreate_v3(pctx, paramsArray, numParams, flags, dev)
 * 
 * cdef CUresult cuCtxDestroy(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxDestroy_v2(ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":97
 *     return ccuda._cuCtxDestroy_v2(ctx)
 * 
 * cdef CUresult cuCtxPushCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxPushCurrent_v2(ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxPushCurrent(CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxPushCurrent", __pyx_f[0], 97, 1, __PYX_ERR(0, 97, __pyx_L1_error));

  /* "cuda/ccuda.pyx":98
 * 
 * cdef CUresult cuCtxPushCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxPushCurrent_v2(ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxPopCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxPushCurrent_v2(__pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 98, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":97
 *     return ccuda._cuCtxDestroy_v2(ctx)
 * 
 * cdef CUresult cuCtxPushCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxPushCurrent_v2(ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxPushCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":100
 *     return ccuda._cuCtxPushCurrent_v2(ctx)
 * 
 * cdef CUresult cuCtxPopCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxPopCurrent_v2(pctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxPopCurrent(CUcontext *__pyx_v_pctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxPopCurrent", __pyx_f[0], 100, 1, __PYX_ERR(0, 100, __pyx_L1_error));

  /* "cuda/ccuda.pyx":101
 * 
 * cdef CUresult cuCtxPopCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxPopCurrent_v2(pctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxPopCurrent_v2(__pyx_v_pctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 101, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":100
 *     return ccuda._cuCtxPushCurrent_v2(ctx)
 * 
 * cdef CUresult cuCtxPopCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxPopCurrent_v2(pctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxPopCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":103
 *     return ccuda._cuCtxPopCurrent_v2(pctx)
 * 
 * cdef CUresult cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetCurrent(ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxSetCurrent(CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxSetCurrent", __pyx_f[0], 103, 1, __PYX_ERR(0, 103, __pyx_L1_error));

  /* "cuda/ccuda.pyx":104
 * 
 * cdef CUresult cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxSetCurrent(ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent(__pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 104, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":103
 *     return ccuda._cuCtxPopCurrent_v2(pctx)
 * 
 * cdef CUresult cuCtxSetCurrent(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetCurrent(ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxSetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":106
 *     return ccuda._cuCtxSetCurrent(ctx)
 * 
 * cdef CUresult cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetCurrent(pctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetCurrent(CUcontext *__pyx_v_pctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetCurrent", __pyx_f[0], 106, 1, __PYX_ERR(0, 106, __pyx_L1_error));

  /* "cuda/ccuda.pyx":107
 * 
 * cdef CUresult cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetCurrent(pctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent(__pyx_v_pctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 107, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":106
 *     return ccuda._cuCtxSetCurrent(ctx)
 * 
 * cdef CUresult cuCtxGetCurrent(CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetCurrent(pctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":109
 *     return ccuda._cuCtxGetCurrent(pctx)
 * 
 * cdef CUresult cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetDevice(device)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetDevice(CUdevice *__pyx_v_device) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetDevice", __pyx_f[0], 109, 1, __PYX_ERR(0, 109, __pyx_L1_error));

  /* "cuda/ccuda.pyx":110
 * 
 * cdef CUresult cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetDevice(device)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevice(__pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 110, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":109
 *     return ccuda._cuCtxGetCurrent(pctx)
 * 
 * cdef CUresult cuCtxGetDevice(CUdevice* device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetDevice(device)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":112
 *     return ccuda._cuCtxGetDevice(device)
 * 
 * cdef CUresult cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetFlags(flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetFlags(unsigned int *__pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetFlags", __pyx_f[0], 112, 1, __PYX_ERR(0, 112, __pyx_L1_error));

  /* "cuda/ccuda.pyx":113
 * 
 * cdef CUresult cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetFlags(flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetFlags(__pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 113, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":112
 *     return ccuda._cuCtxGetDevice(device)
 * 
 * cdef CUresult cuCtxGetFlags(unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetFlags(flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":115
 *     return ccuda._cuCtxGetFlags(flags)
 * 
 * cdef CUresult cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSynchronize()
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxSynchronize(void) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxSynchronize", __pyx_f[0], 115, 1, __PYX_ERR(0, 115, __pyx_L1_error));

  /* "cuda/ccuda.pyx":116
 * 
 * cdef CUresult cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxSynchronize()             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSynchronize(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 116, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":115
 *     return ccuda._cuCtxGetFlags(flags)
 * 
 * cdef CUresult cuCtxSynchronize() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSynchronize()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":118
 *     return ccuda._cuCtxSynchronize()
 * 
 * cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetLimit(limit, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxSetLimit(CUlimit __pyx_v_limit, size_t __pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxSetLimit", __pyx_f[0], 118, 1, __PYX_ERR(0, 118, __pyx_L1_error));

  /* "cuda/ccuda.pyx":119
 * 
 * cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxSetLimit(limit, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetLimit(__pyx_v_limit, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 119, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":118
 *     return ccuda._cuCtxSynchronize()
 * 
 * cdef CUresult cuCtxSetLimit(CUlimit limit, size_t value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetLimit(limit, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxSetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":121
 *     return ccuda._cuCtxSetLimit(limit, value)
 * 
 * cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetLimit(pvalue, limit)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetLimit(size_t *__pyx_v_pvalue, CUlimit __pyx_v_limit) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetLimit", __pyx_f[0], 121, 1, __PYX_ERR(0, 121, __pyx_L1_error));

  /* "cuda/ccuda.pyx":122
 * 
 * cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetLimit(pvalue, limit)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetLimit(__pyx_v_pvalue, __pyx_v_limit); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 122, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":121
 *     return ccuda._cuCtxSetLimit(limit, value)
 * 
 * cdef CUresult cuCtxGetLimit(size_t* pvalue, CUlimit limit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetLimit(pvalue, limit)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetLimit", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":124
 *     return ccuda._cuCtxGetLimit(pvalue, limit)
 * 
 * cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetCacheConfig(pconfig)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetCacheConfig(CUfunc_cache *__pyx_v_pconfig) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetCacheConfig", __pyx_f[0], 124, 1, __PYX_ERR(0, 124, __pyx_L1_error));

  /* "cuda/ccuda.pyx":125
 * 
 * cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetCacheConfig(pconfig)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCacheConfig(__pyx_v_pconfig); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 125, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":124
 *     return ccuda._cuCtxGetLimit(pvalue, limit)
 * 
 * cdef CUresult cuCtxGetCacheConfig(CUfunc_cache* pconfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetCacheConfig(pconfig)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":127
 *     return ccuda._cuCtxGetCacheConfig(pconfig)
 * 
 * cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetCacheConfig(config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxSetCacheConfig(CUfunc_cache __pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxSetCacheConfig", __pyx_f[0], 127, 1, __PYX_ERR(0, 127, __pyx_L1_error));

  /* "cuda/ccuda.pyx":128
 * 
 * cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxSetCacheConfig(config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCacheConfig(__pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 128, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":127
 *     return ccuda._cuCtxGetCacheConfig(pconfig)
 * 
 * cdef CUresult cuCtxSetCacheConfig(CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetCacheConfig(config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":130
 *     return ccuda._cuCtxSetCacheConfig(config)
 * 
 * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetSharedMemConfig(pConfig)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetSharedMemConfig(CUsharedconfig *__pyx_v_pConfig) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetSharedMemConfig", __pyx_f[0], 130, 1, __PYX_ERR(0, 130, __pyx_L1_error));

  /* "cuda/ccuda.pyx":131
 * 
 * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetSharedMemConfig(pConfig)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetSharedMemConfig(__pyx_v_pConfig); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 131, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":130
 *     return ccuda._cuCtxSetCacheConfig(config)
 * 
 * cdef CUresult cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetSharedMemConfig(pConfig)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":133
 *     return ccuda._cuCtxGetSharedMemConfig(pConfig)
 * 
 * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetSharedMemConfig(config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxSetSharedMemConfig(CUsharedconfig __pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxSetSharedMemConfig", __pyx_f[0], 133, 1, __PYX_ERR(0, 133, __pyx_L1_error));

  /* "cuda/ccuda.pyx":134
 * 
 * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxSetSharedMemConfig(config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig(__pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 134, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":133
 *     return ccuda._cuCtxGetSharedMemConfig(pConfig)
 * 
 * cdef CUresult cuCtxSetSharedMemConfig(CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxSetSharedMemConfig(config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":136
 *     return ccuda._cuCtxSetSharedMemConfig(config)
 * 
 * cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetApiVersion(ctx, version)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetApiVersion(CUcontext __pyx_v_ctx, unsigned int *__pyx_v_version) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetApiVersion", __pyx_f[0], 136, 1, __PYX_ERR(0, 136, __pyx_L1_error));

  /* "cuda/ccuda.pyx":137
 * 
 * cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetApiVersion(ctx, version)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetApiVersion(__pyx_v_ctx, __pyx_v_version); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 137, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":136
 *     return ccuda._cuCtxSetSharedMemConfig(config)
 * 
 * cdef CUresult cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetApiVersion(ctx, version)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetApiVersion", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":139
 *     return ccuda._cuCtxGetApiVersion(ctx, version)
 * 
 * cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetStreamPriorityRange(int *__pyx_v_leastPriority, int *__pyx_v_greatestPriority) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetStreamPriorityRange", __pyx_f[0], 139, 1, __PYX_ERR(0, 139, __pyx_L1_error));

  /* "cuda/ccuda.pyx":140
 * 
 * cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetStreamPriorityRange(__pyx_v_leastPriority, __pyx_v_greatestPriority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 140, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":139
 *     return ccuda._cuCtxGetApiVersion(ctx, version)
 * 
 * cdef CUresult cuCtxGetStreamPriorityRange(int* leastPriority, int* greatestPriority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetStreamPriorityRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":142
 *     return ccuda._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority)
 * 
 * cdef CUresult cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxResetPersistingL2Cache()
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxResetPersistingL2Cache(void) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxResetPersistingL2Cache", __pyx_f[0], 142, 1, __PYX_ERR(0, 142, __pyx_L1_error));

  /* "cuda/ccuda.pyx":143
 * 
 * cdef CUresult cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxResetPersistingL2Cache()             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxResetPersistingL2Cache(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 143, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":142
 *     return ccuda._cuCtxGetStreamPriorityRange(leastPriority, greatestPriority)
 * 
 * cdef CUresult cuCtxResetPersistingL2Cache() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxResetPersistingL2Cache()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxResetPersistingL2Cache", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":145
 *     return ccuda._cuCtxResetPersistingL2Cache()
 * 
 * cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetExecAffinity(pExecAffinity, typename)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxGetExecAffinity(CUexecAffinityParam *__pyx_v_pExecAffinity, CUexecAffinityType __pyx_v_typename) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxGetExecAffinity", __pyx_f[0], 145, 1, __PYX_ERR(0, 145, __pyx_L1_error));

  /* "cuda/ccuda.pyx":146
 * 
 * cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxGetExecAffinity(pExecAffinity, typename)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetExecAffinity(__pyx_v_pExecAffinity, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 146, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":145
 *     return ccuda._cuCtxResetPersistingL2Cache()
 * 
 * cdef CUresult cuCtxGetExecAffinity(CUexecAffinityParam* pExecAffinity, CUexecAffinityType typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxGetExecAffinity(pExecAffinity, typename)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxGetExecAffinity", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":148
 *     return ccuda._cuCtxGetExecAffinity(pExecAffinity, typename)
 * 
 * cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxAttach(pctx, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxAttach(CUcontext *__pyx_v_pctx, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxAttach", __pyx_f[0], 148, 1, __PYX_ERR(0, 148, __pyx_L1_error));

  /* "cuda/ccuda.pyx":149
 * 
 * cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxAttach(pctx, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxAttach(__pyx_v_pctx, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 149, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":148
 *     return ccuda._cuCtxGetExecAffinity(pExecAffinity, typename)
 * 
 * cdef CUresult cuCtxAttach(CUcontext* pctx, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxAttach(pctx, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxAttach", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":151
 *     return ccuda._cuCtxAttach(pctx, flags)
 * 
 * cdef CUresult cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxDetach(ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxDetach(CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxDetach", __pyx_f[0], 151, 1, __PYX_ERR(0, 151, __pyx_L1_error));

  /* "cuda/ccuda.pyx":152
 * 
 * cdef CUresult cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxDetach(ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDetach(__pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 152, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":151
 *     return ccuda._cuCtxAttach(pctx, flags)
 * 
 * cdef CUresult cuCtxDetach(CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxDetach(ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxDetach", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":154
 *     return ccuda._cuCtxDetach(ctx)
 * 
 * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleLoad(module, fname)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleLoad(CUmodule *__pyx_v_module, char const *__pyx_v_fname) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleLoad", __pyx_f[0], 154, 1, __PYX_ERR(0, 154, __pyx_L1_error));

  /* "cuda/ccuda.pyx":155
 * 
 * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleLoad(module, fname)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoad(__pyx_v_module, __pyx_v_fname); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 155, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":154
 *     return ccuda._cuCtxDetach(ctx)
 * 
 * cdef CUresult cuModuleLoad(CUmodule* module, const char* fname) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleLoad(module, fname)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleLoad", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":157
 *     return ccuda._cuModuleLoad(module, fname)
 * 
 * cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleLoadData(module, image)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleLoadData(CUmodule *__pyx_v_module, void const *__pyx_v_image) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleLoadData", __pyx_f[0], 157, 1, __PYX_ERR(0, 157, __pyx_L1_error));

  /* "cuda/ccuda.pyx":158
 * 
 * cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleLoadData(module, image)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadData(__pyx_v_module, __pyx_v_image); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 158, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":157
 *     return ccuda._cuModuleLoad(module, fname)
 * 
 * cdef CUresult cuModuleLoadData(CUmodule* module, const void* image) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleLoadData(module, image)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleLoadData", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":160
 *     return ccuda._cuModuleLoadData(module, image)
 * 
 * cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleLoadDataEx(module, image, numOptions, options, optionValues)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleLoadDataEx(CUmodule *__pyx_v_module, void const *__pyx_v_image, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleLoadDataEx", __pyx_f[0], 160, 1, __PYX_ERR(0, 160, __pyx_L1_error));

  /* "cuda/ccuda.pyx":161
 * 
 * cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleLoadDataEx(module, image, numOptions, options, optionValues)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadDataEx(__pyx_v_module, __pyx_v_image, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 161, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":160
 *     return ccuda._cuModuleLoadData(module, image)
 * 
 * cdef CUresult cuModuleLoadDataEx(CUmodule* module, const void* image, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleLoadDataEx(module, image, numOptions, options, optionValues)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleLoadDataEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":163
 *     return ccuda._cuModuleLoadDataEx(module, image, numOptions, options, optionValues)
 * 
 * cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleLoadFatBinary(module, fatCubin)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleLoadFatBinary(CUmodule *__pyx_v_module, void const *__pyx_v_fatCubin) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleLoadFatBinary", __pyx_f[0], 163, 1, __PYX_ERR(0, 163, __pyx_L1_error));

  /* "cuda/ccuda.pyx":164
 * 
 * cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleLoadFatBinary(module, fatCubin)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadFatBinary(__pyx_v_module, __pyx_v_fatCubin); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 164, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":163
 *     return ccuda._cuModuleLoadDataEx(module, image, numOptions, options, optionValues)
 * 
 * cdef CUresult cuModuleLoadFatBinary(CUmodule* module, const void* fatCubin) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleLoadFatBinary(module, fatCubin)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleLoadFatBinary", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":166
 *     return ccuda._cuModuleLoadFatBinary(module, fatCubin)
 * 
 * cdef CUresult cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleUnload(hmod)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleUnload(CUmodule __pyx_v_hmod) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleUnload", __pyx_f[0], 166, 1, __PYX_ERR(0, 166, __pyx_L1_error));

  /* "cuda/ccuda.pyx":167
 * 
 * cdef CUresult cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleUnload(hmod)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleUnload(__pyx_v_hmod); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 167, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":166
 *     return ccuda._cuModuleLoadFatBinary(module, fatCubin)
 * 
 * cdef CUresult cuModuleUnload(CUmodule hmod) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleUnload(hmod)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleUnload", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":169
 *     return ccuda._cuModuleUnload(hmod)
 * 
 * cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetLoadingMode(mode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleGetLoadingMode(CUmoduleLoadingMode *__pyx_v_mode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleGetLoadingMode", __pyx_f[0], 169, 1, __PYX_ERR(0, 169, __pyx_L1_error));

  /* "cuda/ccuda.pyx":170
 * 
 * cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleGetLoadingMode(mode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetLoadingMode(__pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 170, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":169
 *     return ccuda._cuModuleUnload(hmod)
 * 
 * cdef CUresult cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetLoadingMode(mode)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleGetLoadingMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":172
 *     return ccuda._cuModuleGetLoadingMode(mode)
 * 
 * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetFunction(hfunc, hmod, name)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleGetFunction(CUfunction *__pyx_v_hfunc, CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleGetFunction", __pyx_f[0], 172, 1, __PYX_ERR(0, 172, __pyx_L1_error));

  /* "cuda/ccuda.pyx":173
 * 
 * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleGetFunction(hfunc, hmod, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction(__pyx_v_hfunc, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 173, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":172
 *     return ccuda._cuModuleGetLoadingMode(mode)
 * 
 * cdef CUresult cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetFunction(hfunc, hmod, name)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleGetFunction", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":175
 *     return ccuda._cuModuleGetFunction(hfunc, hmod, name)
 * 
 * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleGetGlobal(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_numbytes, CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleGetGlobal", __pyx_f[0], 175, 1, __PYX_ERR(0, 175, __pyx_L1_error));

  /* "cuda/ccuda.pyx":176
 * 
 * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetGlobal_v2(__pyx_v_dptr, __pyx_v_numbytes, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 176, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":175
 *     return ccuda._cuModuleGetFunction(hfunc, hmod, name)
 * 
 * cdef CUresult cuModuleGetGlobal(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleGetGlobal", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":178
 *     return ccuda._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name)
 * 
 * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetTexRef(pTexRef, hmod, name)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleGetTexRef(CUtexref *__pyx_v_pTexRef, CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleGetTexRef", __pyx_f[0], 178, 1, __PYX_ERR(0, 178, __pyx_L1_error));

  /* "cuda/ccuda.pyx":179
 * 
 * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleGetTexRef(pTexRef, hmod, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetTexRef(__pyx_v_pTexRef, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 179, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":178
 *     return ccuda._cuModuleGetGlobal_v2(dptr, numbytes, hmod, name)
 * 
 * cdef CUresult cuModuleGetTexRef(CUtexref* pTexRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetTexRef(pTexRef, hmod, name)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleGetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":181
 *     return ccuda._cuModuleGetTexRef(pTexRef, hmod, name)
 * 
 * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetSurfRef(pSurfRef, hmod, name)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuModuleGetSurfRef(CUsurfref *__pyx_v_pSurfRef, CUmodule __pyx_v_hmod, char const *__pyx_v_name) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuModuleGetSurfRef", __pyx_f[0], 181, 1, __PYX_ERR(0, 181, __pyx_L1_error));

  /* "cuda/ccuda.pyx":182
 * 
 * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuModuleGetSurfRef(pSurfRef, hmod, name)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef(__pyx_v_pSurfRef, __pyx_v_hmod, __pyx_v_name); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 182, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":181
 *     return ccuda._cuModuleGetTexRef(pTexRef, hmod, name)
 * 
 * cdef CUresult cuModuleGetSurfRef(CUsurfref* pSurfRef, CUmodule hmod, const char* name) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuModuleGetSurfRef(pSurfRef, hmod, name)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuModuleGetSurfRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":184
 *     return ccuda._cuModuleGetSurfRef(pSurfRef, hmod, name)
 * 
 * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkCreate_v2(numOptions, options, optionValues, stateOut)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLinkCreate(unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues, CUlinkState *__pyx_v_stateOut) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLinkCreate", __pyx_f[0], 184, 1, __PYX_ERR(0, 184, __pyx_L1_error));

  /* "cuda/ccuda.pyx":185
 * 
 * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLinkCreate_v2(numOptions, options, optionValues, stateOut)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLinkCreate_v2(__pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues, __pyx_v_stateOut); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 185, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":184
 *     return ccuda._cuModuleGetSurfRef(pSurfRef, hmod, name)
 * 
 * cdef CUresult cuLinkCreate(unsigned int numOptions, CUjit_option* options, void** optionValues, CUlinkState* stateOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkCreate_v2(numOptions, options, optionValues, stateOut)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLinkCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":187
 *     return ccuda._cuLinkCreate_v2(numOptions, options, optionValues, stateOut)
 * 
 * cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLinkAddData(CUlinkState __pyx_v_state, CUjitInputType __pyx_v_typename, void *__pyx_v_data, size_t __pyx_v_size, char const *__pyx_v_name, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLinkAddData", __pyx_f[0], 187, 1, __PYX_ERR(0, 187, __pyx_L1_error));

  /* "cuda/ccuda.pyx":188
 * 
 * cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddData_v2(__pyx_v_state, __pyx_v_typename, __pyx_v_data, __pyx_v_size, __pyx_v_name, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 188, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":187
 *     return ccuda._cuLinkCreate_v2(numOptions, options, optionValues, stateOut)
 * 
 * cdef CUresult cuLinkAddData(CUlinkState state, CUjitInputType typename, void* data, size_t size, const char* name, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLinkAddData", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":190
 *     return ccuda._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues)
 * 
 * cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLinkAddFile(CUlinkState __pyx_v_state, CUjitInputType __pyx_v_typename, char const *__pyx_v_path, unsigned int __pyx_v_numOptions, CUjit_option *__pyx_v_options, void **__pyx_v_optionValues) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLinkAddFile", __pyx_f[0], 190, 1, __PYX_ERR(0, 190, __pyx_L1_error));

  /* "cuda/ccuda.pyx":191
 * 
 * cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddFile_v2(__pyx_v_state, __pyx_v_typename, __pyx_v_path, __pyx_v_numOptions, __pyx_v_options, __pyx_v_optionValues); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 191, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":190
 *     return ccuda._cuLinkAddData_v2(state, typename, data, size, name, numOptions, options, optionValues)
 * 
 * cdef CUresult cuLinkAddFile(CUlinkState state, CUjitInputType typename, const char* path, unsigned int numOptions, CUjit_option* options, void** optionValues) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLinkAddFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":193
 *     return ccuda._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues)
 * 
 * cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkComplete(state, cubinOut, sizeOut)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLinkComplete(CUlinkState __pyx_v_state, void **__pyx_v_cubinOut, size_t *__pyx_v_sizeOut) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLinkComplete", __pyx_f[0], 193, 1, __PYX_ERR(0, 193, __pyx_L1_error));

  /* "cuda/ccuda.pyx":194
 * 
 * cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLinkComplete(state, cubinOut, sizeOut)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLinkComplete(__pyx_v_state, __pyx_v_cubinOut, __pyx_v_sizeOut); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 194, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":193
 *     return ccuda._cuLinkAddFile_v2(state, typename, path, numOptions, options, optionValues)
 * 
 * cdef CUresult cuLinkComplete(CUlinkState state, void** cubinOut, size_t* sizeOut) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkComplete(state, cubinOut, sizeOut)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLinkComplete", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":196
 *     return ccuda._cuLinkComplete(state, cubinOut, sizeOut)
 * 
 * cdef CUresult cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkDestroy(state)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLinkDestroy(CUlinkState __pyx_v_state) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLinkDestroy", __pyx_f[0], 196, 1, __PYX_ERR(0, 196, __pyx_L1_error));

  /* "cuda/ccuda.pyx":197
 * 
 * cdef CUresult cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLinkDestroy(state)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLinkDestroy(__pyx_v_state); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 197, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":196
 *     return ccuda._cuLinkComplete(state, cubinOut, sizeOut)
 * 
 * cdef CUresult cuLinkDestroy(CUlinkState state) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLinkDestroy(state)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLinkDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":199
 *     return ccuda._cuLinkDestroy(state)
 * 
 * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetInfo_v2(free, total)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetInfo(size_t *__pyx_v_free, size_t *__pyx_v_total) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemGetInfo", __pyx_f[0], 199, 1, __PYX_ERR(0, 199, __pyx_L1_error));

  /* "cuda/ccuda.pyx":200
 * 
 * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemGetInfo_v2(free, total)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetInfo_v2(__pyx_v_free, __pyx_v_total); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 200, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":199
 *     return ccuda._cuLinkDestroy(state)
 * 
 * cdef CUresult cuMemGetInfo(size_t* free, size_t* total) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetInfo_v2(free, total)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemGetInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":202
 *     return ccuda._cuMemGetInfo_v2(free, total)
 * 
 * cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAlloc_v2(dptr, bytesize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAlloc(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAlloc", __pyx_f[0], 202, 1, __PYX_ERR(0, 202, __pyx_L1_error));

  /* "cuda/ccuda.pyx":203
 * 
 * cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAlloc_v2(dptr, bytesize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAlloc_v2(__pyx_v_dptr, __pyx_v_bytesize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 203, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":202
 *     return ccuda._cuMemGetInfo_v2(free, total)
 * 
 * cdef CUresult cuMemAlloc(CUdeviceptr* dptr, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAlloc_v2(dptr, bytesize)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":205
 *     return ccuda._cuMemAlloc_v2(dptr, bytesize)
 * 
 * cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAllocPitch(CUdeviceptr *__pyx_v_dptr, size_t *__pyx_v_pPitch, size_t __pyx_v_WidthInBytes, size_t __pyx_v_Height, unsigned int __pyx_v_ElementSizeBytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAllocPitch", __pyx_f[0], 205, 1, __PYX_ERR(0, 205, __pyx_L1_error));

  /* "cuda/ccuda.pyx":206
 * 
 * cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemFree(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2(__pyx_v_dptr, __pyx_v_pPitch, __pyx_v_WidthInBytes, __pyx_v_Height, __pyx_v_ElementSizeBytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 206, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":205
 *     return ccuda._cuMemAlloc_v2(dptr, bytesize)
 * 
 * cdef CUresult cuMemAllocPitch(CUdeviceptr* dptr, size_t* pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAllocPitch", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":208
 *     return ccuda._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 * 
 * cdef CUresult cuMemFree(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemFree_v2(dptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemFree(CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemFree", __pyx_f[0], 208, 1, __PYX_ERR(0, 208, __pyx_L1_error));

  /* "cuda/ccuda.pyx":209
 * 
 * cdef CUresult cuMemFree(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemFree_v2(dptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemFree_v2(__pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 209, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":208
 *     return ccuda._cuMemAllocPitch_v2(dptr, pPitch, WidthInBytes, Height, ElementSizeBytes)
 * 
 * cdef CUresult cuMemFree(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemFree_v2(dptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemFree", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":211
 *     return ccuda._cuMemFree_v2(dptr)
 * 
 * cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAddressRange_v2(pbase, psize, dptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetAddressRange(CUdeviceptr *__pyx_v_pbase, size_t *__pyx_v_psize, CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemGetAddressRange", __pyx_f[0], 211, 1, __PYX_ERR(0, 211, __pyx_L1_error));

  /* "cuda/ccuda.pyx":212
 * 
 * cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemGetAddressRange_v2(pbase, psize, dptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAddressRange_v2(__pyx_v_pbase, __pyx_v_psize, __pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 212, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":211
 *     return ccuda._cuMemFree_v2(dptr)
 * 
 * cdef CUresult cuMemGetAddressRange(CUdeviceptr* pbase, size_t* psize, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAddressRange_v2(pbase, psize, dptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemGetAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":214
 *     return ccuda._cuMemGetAddressRange_v2(pbase, psize, dptr)
 * 
 * cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocHost_v2(pp, bytesize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAllocHost(void **__pyx_v_pp, size_t __pyx_v_bytesize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAllocHost", __pyx_f[0], 214, 1, __PYX_ERR(0, 214, __pyx_L1_error));

  /* "cuda/ccuda.pyx":215
 * 
 * cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAllocHost_v2(pp, bytesize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocHost_v2(__pyx_v_pp, __pyx_v_bytesize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 215, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":214
 *     return ccuda._cuMemGetAddressRange_v2(pbase, psize, dptr)
 * 
 * cdef CUresult cuMemAllocHost(void** pp, size_t bytesize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocHost_v2(pp, bytesize)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAllocHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":217
 *     return ccuda._cuMemAllocHost_v2(pp, bytesize)
 * 
 * cdef CUresult cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemFreeHost(p)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemFreeHost(void *__pyx_v_p) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemFreeHost", __pyx_f[0], 217, 1, __PYX_ERR(0, 217, __pyx_L1_error));

  /* "cuda/ccuda.pyx":218
 * 
 * cdef CUresult cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemFreeHost(p)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeHost(__pyx_v_p); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 218, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":217
 *     return ccuda._cuMemAllocHost_v2(pp, bytesize)
 * 
 * cdef CUresult cuMemFreeHost(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemFreeHost(p)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemFreeHost", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":220
 *     return ccuda._cuMemFreeHost(p)
 * 
 * cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostAlloc(pp, bytesize, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemHostAlloc(void **__pyx_v_pp, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemHostAlloc", __pyx_f[0], 220, 1, __PYX_ERR(0, 220, __pyx_L1_error));

  /* "cuda/ccuda.pyx":221
 * 
 * cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemHostAlloc(pp, bytesize, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc(__pyx_v_pp, __pyx_v_bytesize, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 221, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":220
 *     return ccuda._cuMemFreeHost(p)
 * 
 * cdef CUresult cuMemHostAlloc(void** pp, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostAlloc(pp, bytesize, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemHostAlloc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":223
 *     return ccuda._cuMemHostAlloc(pp, bytesize, Flags)
 * 
 * cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostGetDevicePointer_v2(pdptr, p, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemHostGetDevicePointer(CUdeviceptr *__pyx_v_pdptr, void *__pyx_v_p, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemHostGetDevicePointer", __pyx_f[0], 223, 1, __PYX_ERR(0, 223, __pyx_L1_error));

  /* "cuda/ccuda.pyx":224
 * 
 * cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemHostGetDevicePointer_v2(pdptr, p, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetDevicePointer_v2(__pyx_v_pdptr, __pyx_v_p, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 224, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":223
 *     return ccuda._cuMemHostAlloc(pp, bytesize, Flags)
 * 
 * cdef CUresult cuMemHostGetDevicePointer(CUdeviceptr* pdptr, void* p, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostGetDevicePointer_v2(pdptr, p, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemHostGetDevicePointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":226
 *     return ccuda._cuMemHostGetDevicePointer_v2(pdptr, p, Flags)
 * 
 * cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostGetFlags(pFlags, p)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemHostGetFlags(unsigned int *__pyx_v_pFlags, void *__pyx_v_p) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemHostGetFlags", __pyx_f[0], 226, 1, __PYX_ERR(0, 226, __pyx_L1_error));

  /* "cuda/ccuda.pyx":227
 * 
 * cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemHostGetFlags(pFlags, p)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetFlags(__pyx_v_pFlags, __pyx_v_p); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 227, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":226
 *     return ccuda._cuMemHostGetDevicePointer_v2(pdptr, p, Flags)
 * 
 * cdef CUresult cuMemHostGetFlags(unsigned int* pFlags, void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostGetFlags(pFlags, p)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemHostGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":229
 *     return ccuda._cuMemHostGetFlags(pFlags, p)
 * 
 * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocManaged(dptr, bytesize, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAllocManaged(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAllocManaged", __pyx_f[0], 229, 1, __PYX_ERR(0, 229, __pyx_L1_error));

  /* "cuda/ccuda.pyx":230
 * 
 * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAllocManaged(dptr, bytesize, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocManaged(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 230, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":229
 *     return ccuda._cuMemHostGetFlags(pFlags, p)
 * 
 * cdef CUresult cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocManaged(dptr, bytesize, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAllocManaged", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":232
 *     return ccuda._cuMemAllocManaged(dptr, bytesize, flags)
 * 
 * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetByPCIBusId(dev, pciBusId)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetByPCIBusId(CUdevice *__pyx_v_dev, char const *__pyx_v_pciBusId) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetByPCIBusId", __pyx_f[0], 232, 1, __PYX_ERR(0, 232, __pyx_L1_error));

  /* "cuda/ccuda.pyx":233
 * 
 * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetByPCIBusId(dev, pciBusId)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetByPCIBusId(__pyx_v_dev, __pyx_v_pciBusId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 233, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":232
 *     return ccuda._cuMemAllocManaged(dptr, bytesize, flags)
 * 
 * cdef CUresult cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetByPCIBusId(dev, pciBusId)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetByPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":235
 *     return ccuda._cuDeviceGetByPCIBusId(dev, pciBusId)
 * 
 * cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetPCIBusId(pciBusId, length, dev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetPCIBusId(char *__pyx_v_pciBusId, int __pyx_v_length, CUdevice __pyx_v_dev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetPCIBusId", __pyx_f[0], 235, 1, __PYX_ERR(0, 235, __pyx_L1_error));

  /* "cuda/ccuda.pyx":236
 * 
 * cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetPCIBusId(pciBusId, length, dev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetPCIBusId(__pyx_v_pciBusId, __pyx_v_length, __pyx_v_dev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":235
 *     return ccuda._cuDeviceGetByPCIBusId(dev, pciBusId)
 * 
 * cdef CUresult cuDeviceGetPCIBusId(char* pciBusId, int length, CUdevice dev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetPCIBusId(pciBusId, length, dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetPCIBusId", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":238
 *     return ccuda._cuDeviceGetPCIBusId(pciBusId, length, dev)
 * 
 * cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcGetEventHandle(pHandle, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuIpcGetEventHandle(CUipcEventHandle *__pyx_v_pHandle, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuIpcGetEventHandle", __pyx_f[0], 238, 1, __PYX_ERR(0, 238, __pyx_L1_error));

  /* "cuda/ccuda.pyx":239
 * 
 * cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuIpcGetEventHandle(pHandle, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetEventHandle(__pyx_v_pHandle, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 239, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":238
 *     return ccuda._cuDeviceGetPCIBusId(pciBusId, length, dev)
 * 
 * cdef CUresult cuIpcGetEventHandle(CUipcEventHandle* pHandle, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcGetEventHandle(pHandle, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuIpcGetEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":241
 *     return ccuda._cuIpcGetEventHandle(pHandle, event)
 * 
 * cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcOpenEventHandle(phEvent, handle)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuIpcOpenEventHandle(CUevent *__pyx_v_phEvent, CUipcEventHandle __pyx_v_handle) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuIpcOpenEventHandle", __pyx_f[0], 241, 1, __PYX_ERR(0, 241, __pyx_L1_error));

  /* "cuda/ccuda.pyx":242
 * 
 * cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuIpcOpenEventHandle(phEvent, handle)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenEventHandle(__pyx_v_phEvent, __pyx_v_handle); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 242, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":241
 *     return ccuda._cuIpcGetEventHandle(pHandle, event)
 * 
 * cdef CUresult cuIpcOpenEventHandle(CUevent* phEvent, CUipcEventHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcOpenEventHandle(phEvent, handle)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuIpcOpenEventHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":244
 *     return ccuda._cuIpcOpenEventHandle(phEvent, handle)
 * 
 * cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcGetMemHandle(pHandle, dptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuIpcGetMemHandle(CUipcMemHandle *__pyx_v_pHandle, CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuIpcGetMemHandle", __pyx_f[0], 244, 1, __PYX_ERR(0, 244, __pyx_L1_error));

  /* "cuda/ccuda.pyx":245
 * 
 * cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuIpcGetMemHandle(pHandle, dptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetMemHandle(__pyx_v_pHandle, __pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 245, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":244
 *     return ccuda._cuIpcOpenEventHandle(phEvent, handle)
 * 
 * cdef CUresult cuIpcGetMemHandle(CUipcMemHandle* pHandle, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcGetMemHandle(pHandle, dptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuIpcGetMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":247
 *     return ccuda._cuIpcGetMemHandle(pHandle, dptr)
 * 
 * cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcOpenMemHandle_v2(pdptr, handle, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuIpcOpenMemHandle(CUdeviceptr *__pyx_v_pdptr, CUipcMemHandle __pyx_v_handle, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuIpcOpenMemHandle", __pyx_f[0], 247, 1, __PYX_ERR(0, 247, __pyx_L1_error));

  /* "cuda/ccuda.pyx":248
 * 
 * cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuIpcOpenMemHandle_v2(pdptr, handle, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenMemHandle_v2(__pyx_v_pdptr, __pyx_v_handle, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 248, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":247
 *     return ccuda._cuIpcGetMemHandle(pHandle, dptr)
 * 
 * cdef CUresult cuIpcOpenMemHandle(CUdeviceptr* pdptr, CUipcMemHandle handle, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcOpenMemHandle_v2(pdptr, handle, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuIpcOpenMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":250
 *     return ccuda._cuIpcOpenMemHandle_v2(pdptr, handle, Flags)
 * 
 * cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcCloseMemHandle(dptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuIpcCloseMemHandle(CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuIpcCloseMemHandle", __pyx_f[0], 250, 1, __PYX_ERR(0, 250, __pyx_L1_error));

  /* "cuda/ccuda.pyx":251
 * 
 * cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuIpcCloseMemHandle(dptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuIpcCloseMemHandle(__pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 251, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":250
 *     return ccuda._cuIpcOpenMemHandle_v2(pdptr, handle, Flags)
 * 
 * cdef CUresult cuIpcCloseMemHandle(CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuIpcCloseMemHandle(dptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuIpcCloseMemHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":253
 *     return ccuda._cuIpcCloseMemHandle(dptr)
 * 
 * cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostRegister_v2(p, bytesize, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemHostRegister(void *__pyx_v_p, size_t __pyx_v_bytesize, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemHostRegister", __pyx_f[0], 253, 1, __PYX_ERR(0, 253, __pyx_L1_error));

  /* "cuda/ccuda.pyx":254
 * 
 * cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemHostRegister_v2(p, bytesize, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostRegister_v2(__pyx_v_p, __pyx_v_bytesize, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 254, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":253
 *     return ccuda._cuIpcCloseMemHandle(dptr)
 * 
 * cdef CUresult cuMemHostRegister(void* p, size_t bytesize, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostRegister_v2(p, bytesize, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemHostRegister", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":256
 *     return ccuda._cuMemHostRegister_v2(p, bytesize, Flags)
 * 
 * cdef CUresult cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostUnregister(p)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemHostUnregister(void *__pyx_v_p) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemHostUnregister", __pyx_f[0], 256, 1, __PYX_ERR(0, 256, __pyx_L1_error));

  /* "cuda/ccuda.pyx":257
 * 
 * cdef CUresult cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemHostUnregister(p)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemHostUnregister(__pyx_v_p); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 257, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":256
 *     return ccuda._cuMemHostRegister_v2(p, bytesize, Flags)
 * 
 * cdef CUresult cuMemHostUnregister(void* p) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemHostUnregister(p)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemHostUnregister", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":259
 *     return ccuda._cuMemHostUnregister(p)
 * 
 * cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy(dst, src, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpy(CUdeviceptr __pyx_v_dst, CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpy", __pyx_f[0], 259, 1, __PYX_ERR(0, 259, __pyx_L1_error));

  /* "cuda/ccuda.pyx":260
 * 
 * cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpy(dst, src, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 260, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":259
 *     return ccuda._cuMemHostUnregister(p)
 * 
 * cdef CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy(dst, src, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":262
 *     return ccuda._cuMemcpy(dst, src, ByteCount)
 * 
 * cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyPeer(CUdeviceptr __pyx_v_dstDevice, CUcontext __pyx_v_dstContext, CUdeviceptr __pyx_v_srcDevice, CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyPeer", __pyx_f[0], 262, 1, __PYX_ERR(0, 262, __pyx_L1_error));

  /* "cuda/ccuda.pyx":263
 * 
 * cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeer(__pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 263, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":262
 *     return ccuda._cuMemcpy(dst, src, ByteCount)
 * 
 * cdef CUresult cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":265
 *     return ccuda._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 * 
 * cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyHtoD(CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyHtoD", __pyx_f[0], 265, 1, __PYX_ERR(0, 265, __pyx_L1_error));

  /* "cuda/ccuda.pyx":266
 * 
 * cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2(__pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 266, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":265
 *     return ccuda._cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, ByteCount)
 * 
 * cdef CUresult cuMemcpyHtoD(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyHtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":268
 *     return ccuda._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount)
 * 
 * cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyDtoH(void *__pyx_v_dstHost, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyDtoH", __pyx_f[0], 268, 1, __PYX_ERR(0, 268, __pyx_L1_error));

  /* "cuda/ccuda.pyx":269
 * 
 * cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 269, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":268
 *     return ccuda._cuMemcpyHtoD_v2(dstDevice, srcHost, ByteCount)
 * 
 * cdef CUresult cuMemcpyDtoH(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyDtoH", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":271
 *     return ccuda._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount)
 * 
 * cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyDtoD(CUdeviceptr __pyx_v_dstDevice, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyDtoD", __pyx_f[0], 271, 1, __PYX_ERR(0, 271, __pyx_L1_error));

  /* "cuda/ccuda.pyx":272
 * 
 * cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 272, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":271
 *     return ccuda._cuMemcpyDtoH_v2(dstHost, srcDevice, ByteCount)
 * 
 * cdef CUresult cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyDtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":274
 *     return ccuda._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount)
 * 
 * cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyDtoA(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyDtoA", __pyx_f[0], 274, 1, __PYX_ERR(0, 274, __pyx_L1_error));

  /* "cuda/ccuda.pyx":275
 * 
 * cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoA_v2(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcDevice, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 275, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":274
 *     return ccuda._cuMemcpyDtoD_v2(dstDevice, srcDevice, ByteCount)
 * 
 * cdef CUresult cuMemcpyDtoA(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyDtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":277
 *     return ccuda._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount)
 * 
 * cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyAtoD(CUdeviceptr __pyx_v_dstDevice, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyAtoD", __pyx_f[0], 277, 1, __PYX_ERR(0, 277, __pyx_L1_error));

  /* "cuda/ccuda.pyx":278
 * 
 * cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoD_v2(__pyx_v_dstDevice, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 278, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":277
 *     return ccuda._cuMemcpyDtoA_v2(dstArray, dstOffset, srcDevice, ByteCount)
 * 
 * cdef CUresult cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyAtoD", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":280
 *     return ccuda._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount)
 * 
 * cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyHtoA(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyHtoA", __pyx_f[0], 280, 1, __PYX_ERR(0, 280, __pyx_L1_error));

  /* "cuda/ccuda.pyx":281
 * 
 * cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoA_v2(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 281, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":280
 *     return ccuda._cuMemcpyAtoD_v2(dstDevice, srcArray, srcOffset, ByteCount)
 * 
 * cdef CUresult cuMemcpyHtoA(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyHtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":283
 *     return ccuda._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount)
 * 
 * cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyAtoH(void *__pyx_v_dstHost, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyAtoH", __pyx_f[0], 283, 1, __PYX_ERR(0, 283, __pyx_L1_error));

  /* "cuda/ccuda.pyx":284
 * 
 * cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoH_v2(__pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 284, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":283
 *     return ccuda._cuMemcpyHtoA_v2(dstArray, dstOffset, srcHost, ByteCount)
 * 
 * cdef CUresult cuMemcpyAtoH(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyAtoH", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":286
 *     return ccuda._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount)
 * 
 * cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyAtoA(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyAtoA", __pyx_f[0], 286, 1, __PYX_ERR(0, 286, __pyx_L1_error));

  /* "cuda/ccuda.pyx":287
 * 
 * cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoA_v2(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 287, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":286
 *     return ccuda._cuMemcpyAtoH_v2(dstHost, srcArray, srcOffset, ByteCount)
 * 
 * cdef CUresult cuMemcpyAtoA(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyAtoA", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":289
 *     return ccuda._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 * 
 * cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy2D_v2(pCopy)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpy2D(CUDA_MEMCPY2D const *__pyx_v_pCopy) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpy2D", __pyx_f[0], 289, 1, __PYX_ERR(0, 289, __pyx_L1_error));

  /* "cuda/ccuda.pyx":290
 * 
 * cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpy2D_v2(pCopy)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2D_v2(__pyx_v_pCopy); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 290, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":289
 *     return ccuda._cuMemcpyAtoA_v2(dstArray, dstOffset, srcArray, srcOffset, ByteCount)
 * 
 * cdef CUresult cuMemcpy2D(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy2D_v2(pCopy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpy2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":292
 *     return ccuda._cuMemcpy2D_v2(pCopy)
 * 
 * cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy2DUnaligned_v2(pCopy)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpy2DUnaligned(CUDA_MEMCPY2D const *__pyx_v_pCopy) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpy2DUnaligned", __pyx_f[0], 292, 1, __PYX_ERR(0, 292, __pyx_L1_error));

  /* "cuda/ccuda.pyx":293
 * 
 * cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpy2DUnaligned_v2(pCopy)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2(__pyx_v_pCopy); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 293, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":292
 *     return ccuda._cuMemcpy2D_v2(pCopy)
 * 
 * cdef CUresult cuMemcpy2DUnaligned(const CUDA_MEMCPY2D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy2DUnaligned_v2(pCopy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpy2DUnaligned", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":295
 *     return ccuda._cuMemcpy2DUnaligned_v2(pCopy)
 * 
 * cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy3D_v2(pCopy)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpy3D(CUDA_MEMCPY3D const *__pyx_v_pCopy) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpy3D", __pyx_f[0], 295, 1, __PYX_ERR(0, 295, __pyx_L1_error));

  /* "cuda/ccuda.pyx":296
 * 
 * cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpy3D_v2(pCopy)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2(__pyx_v_pCopy); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 296, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":295
 *     return ccuda._cuMemcpy2DUnaligned_v2(pCopy)
 * 
 * cdef CUresult cuMemcpy3D(const CUDA_MEMCPY3D* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy3D_v2(pCopy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpy3D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":298
 *     return ccuda._cuMemcpy3D_v2(pCopy)
 * 
 * cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy3DPeer(pCopy)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpy3DPeer(CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpy3DPeer", __pyx_f[0], 298, 1, __PYX_ERR(0, 298, __pyx_L1_error));

  /* "cuda/ccuda.pyx":299
 * 
 * cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpy3DPeer(pCopy)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer(__pyx_v_pCopy); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 299, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":298
 *     return ccuda._cuMemcpy3D_v2(pCopy)
 * 
 * cdef CUresult cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER* pCopy) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy3DPeer(pCopy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpy3DPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":301
 *     return ccuda._cuMemcpy3DPeer(pCopy)
 * 
 * cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAsync(dst, src, ByteCount, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyAsync(CUdeviceptr __pyx_v_dst, CUdeviceptr __pyx_v_src, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyAsync", __pyx_f[0], 301, 1, __PYX_ERR(0, 301, __pyx_L1_error));

  /* "cuda/ccuda.pyx":302
 * 
 * cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyAsync(dst, src, ByteCount, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync(__pyx_v_dst, __pyx_v_src, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 302, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":301
 *     return ccuda._cuMemcpy3DPeer(pCopy)
 * 
 * cdef CUresult cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAsync(dst, src, ByteCount, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":304
 *     return ccuda._cuMemcpyAsync(dst, src, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyPeerAsync(CUdeviceptr __pyx_v_dstDevice, CUcontext __pyx_v_dstContext, CUdeviceptr __pyx_v_srcDevice, CUcontext __pyx_v_srcContext, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyPeerAsync", __pyx_f[0], 304, 1, __PYX_ERR(0, 304, __pyx_L1_error));

  /* "cuda/ccuda.pyx":305
 * 
 * cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeerAsync(__pyx_v_dstDevice, __pyx_v_dstContext, __pyx_v_srcDevice, __pyx_v_srcContext, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 305, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":304
 *     return ccuda._cuMemcpyAsync(dst, src, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":307
 *     return ccuda._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyHtoDAsync(CUdeviceptr __pyx_v_dstDevice, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyHtoDAsync", __pyx_f[0], 307, 1, __PYX_ERR(0, 307, __pyx_L1_error));

  /* "cuda/ccuda.pyx":308
 * 
 * cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2(__pyx_v_dstDevice, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 308, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":307
 *     return ccuda._cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyHtoDAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":310
 *     return ccuda._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyDtoHAsync(void *__pyx_v_dstHost, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyDtoHAsync", __pyx_f[0], 310, 1, __PYX_ERR(0, 310, __pyx_L1_error));

  /* "cuda/ccuda.pyx":311
 * 
 * cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2(__pyx_v_dstHost, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 311, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":310
 *     return ccuda._cuMemcpyHtoDAsync_v2(dstDevice, srcHost, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyDtoHAsync(void* dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyDtoHAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":313
 *     return ccuda._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyDtoDAsync(CUdeviceptr __pyx_v_dstDevice, CUdeviceptr __pyx_v_srcDevice, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyDtoDAsync", __pyx_f[0], 313, 1, __PYX_ERR(0, 313, __pyx_L1_error));

  /* "cuda/ccuda.pyx":314
 * 
 * cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2(__pyx_v_dstDevice, __pyx_v_srcDevice, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 314, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":313
 *     return ccuda._cuMemcpyDtoHAsync_v2(dstHost, srcDevice, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyDtoDAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":316
 *     return ccuda._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyHtoAAsync(CUarray __pyx_v_dstArray, size_t __pyx_v_dstOffset, void const *__pyx_v_srcHost, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyHtoAAsync", __pyx_f[0], 316, 1, __PYX_ERR(0, 316, __pyx_L1_error));

  /* "cuda/ccuda.pyx":317
 * 
 * cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoAAsync_v2(__pyx_v_dstArray, __pyx_v_dstOffset, __pyx_v_srcHost, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 317, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":316
 *     return ccuda._cuMemcpyDtoDAsync_v2(dstDevice, srcDevice, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyHtoAAsync(CUarray dstArray, size_t dstOffset, const void* srcHost, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyHtoAAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":319
 *     return ccuda._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpyAtoHAsync(void *__pyx_v_dstHost, CUarray __pyx_v_srcArray, size_t __pyx_v_srcOffset, size_t __pyx_v_ByteCount, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpyAtoHAsync", __pyx_f[0], 319, 1, __PYX_ERR(0, 319, __pyx_L1_error));

  /* "cuda/ccuda.pyx":320
 * 
 * cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoHAsync_v2(__pyx_v_dstHost, __pyx_v_srcArray, __pyx_v_srcOffset, __pyx_v_ByteCount, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 320, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":319
 *     return ccuda._cuMemcpyHtoAAsync_v2(dstArray, dstOffset, srcHost, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpyAtoHAsync(void* dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpyAtoHAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":322
 *     return ccuda._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy2DAsync_v2(pCopy, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpy2DAsync(CUDA_MEMCPY2D const *__pyx_v_pCopy, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpy2DAsync", __pyx_f[0], 322, 1, __PYX_ERR(0, 322, __pyx_L1_error));

  /* "cuda/ccuda.pyx":323
 * 
 * cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpy2DAsync_v2(pCopy, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 323, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":322
 *     return ccuda._cuMemcpyAtoHAsync_v2(dstHost, srcArray, srcOffset, ByteCount, hStream)
 * 
 * cdef CUresult cuMemcpy2DAsync(const CUDA_MEMCPY2D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy2DAsync_v2(pCopy, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpy2DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":325
 *     return ccuda._cuMemcpy2DAsync_v2(pCopy, hStream)
 * 
 * cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy3DAsync_v2(pCopy, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpy3DAsync(CUDA_MEMCPY3D const *__pyx_v_pCopy, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpy3DAsync", __pyx_f[0], 325, 1, __PYX_ERR(0, 325, __pyx_L1_error));

  /* "cuda/ccuda.pyx":326
 * 
 * cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpy3DAsync_v2(pCopy, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 326, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":325
 *     return ccuda._cuMemcpy2DAsync_v2(pCopy, hStream)
 * 
 * cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy3DAsync_v2(pCopy, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpy3DAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":328
 *     return ccuda._cuMemcpy3DAsync_v2(pCopy, hStream)
 * 
 * cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy3DPeerAsync(pCopy, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemcpy3DPeerAsync(CUDA_MEMCPY3D_PEER const *__pyx_v_pCopy, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemcpy3DPeerAsync", __pyx_f[0], 328, 1, __PYX_ERR(0, 328, __pyx_L1_error));

  /* "cuda/ccuda.pyx":329
 * 
 * cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemcpy3DPeerAsync(pCopy, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync(__pyx_v_pCopy, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 329, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":328
 *     return ccuda._cuMemcpy3DAsync_v2(pCopy, hStream)
 * 
 * cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemcpy3DPeerAsync(pCopy, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemcpy3DPeerAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":331
 *     return ccuda._cuMemcpy3DPeerAsync(pCopy, hStream)
 * 
 * cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD8_v2(dstDevice, uc, N)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD8(CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD8", __pyx_f[0], 331, 1, __PYX_ERR(0, 331, __pyx_L1_error));

  /* "cuda/ccuda.pyx":332
 * 
 * cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD8_v2(dstDevice, uc, N)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 332, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":331
 *     return ccuda._cuMemcpy3DPeerAsync(pCopy, hStream)
 * 
 * cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD8_v2(dstDevice, uc, N)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD8", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":334
 *     return ccuda._cuMemsetD8_v2(dstDevice, uc, N)
 * 
 * cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD16_v2(dstDevice, us, N)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD16(CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD16", __pyx_f[0], 334, 1, __PYX_ERR(0, 334, __pyx_L1_error));

  /* "cuda/ccuda.pyx":335
 * 
 * cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD16_v2(dstDevice, us, N)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16_v2(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 335, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":334
 *     return ccuda._cuMemsetD8_v2(dstDevice, uc, N)
 * 
 * cdef CUresult cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD16_v2(dstDevice, us, N)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD16", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":337
 *     return ccuda._cuMemsetD16_v2(dstDevice, us, N)
 * 
 * cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD32_v2(dstDevice, ui, N)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD32(CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD32", __pyx_f[0], 337, 1, __PYX_ERR(0, 337, __pyx_L1_error));

  /* "cuda/ccuda.pyx":338
 * 
 * cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD32_v2(dstDevice, ui, N)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32_v2(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 338, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":337
 *     return ccuda._cuMemsetD16_v2(dstDevice, us, N)
 * 
 * cdef CUresult cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, size_t N) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD32_v2(dstDevice, ui, N)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD32", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":340
 *     return ccuda._cuMemsetD32_v2(dstDevice, ui, N)
 * 
 * cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD2D8(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD2D8", __pyx_f[0], 340, 1, __PYX_ERR(0, 340, __pyx_L1_error));

  /* "cuda/ccuda.pyx":341
 * 
 * cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 341, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":340
 *     return ccuda._cuMemsetD32_v2(dstDevice, ui, N)
 * 
 * cdef CUresult cuMemsetD2D8(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD2D8", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":343
 *     return ccuda._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height)
 * 
 * cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD2D16(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD2D16", __pyx_f[0], 343, 1, __PYX_ERR(0, 343, __pyx_L1_error));

  /* "cuda/ccuda.pyx":344
 * 
 * cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16_v2(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 344, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":343
 *     return ccuda._cuMemsetD2D8_v2(dstDevice, dstPitch, uc, Width, Height)
 * 
 * cdef CUresult cuMemsetD2D16(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD2D16", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":346
 *     return ccuda._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height)
 * 
 * cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD2D32(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD2D32", __pyx_f[0], 346, 1, __PYX_ERR(0, 346, __pyx_L1_error));

  /* "cuda/ccuda.pyx":347
 * 
 * cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32_v2(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 347, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":346
 *     return ccuda._cuMemsetD2D16_v2(dstDevice, dstPitch, us, Width, Height)
 * 
 * cdef CUresult cuMemsetD2D32(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD2D32", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":349
 *     return ccuda._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height)
 * 
 * cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD8Async(dstDevice, uc, N, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD8Async(CUdeviceptr __pyx_v_dstDevice, unsigned char __pyx_v_uc, size_t __pyx_v_N, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD8Async", __pyx_f[0], 349, 1, __PYX_ERR(0, 349, __pyx_L1_error));

  /* "cuda/ccuda.pyx":350
 * 
 * cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD8Async(dstDevice, uc, N, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async(__pyx_v_dstDevice, __pyx_v_uc, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 350, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":349
 *     return ccuda._cuMemsetD2D32_v2(dstDevice, dstPitch, ui, Width, Height)
 * 
 * cdef CUresult cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD8Async(dstDevice, uc, N, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD8Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":352
 *     return ccuda._cuMemsetD8Async(dstDevice, uc, N, hStream)
 * 
 * cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD16Async(dstDevice, us, N, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD16Async(CUdeviceptr __pyx_v_dstDevice, unsigned short __pyx_v_us, size_t __pyx_v_N, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD16Async", __pyx_f[0], 352, 1, __PYX_ERR(0, 352, __pyx_L1_error));

  /* "cuda/ccuda.pyx":353
 * 
 * cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD16Async(dstDevice, us, N, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16Async(__pyx_v_dstDevice, __pyx_v_us, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 353, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":352
 *     return ccuda._cuMemsetD8Async(dstDevice, uc, N, hStream)
 * 
 * cdef CUresult cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD16Async(dstDevice, us, N, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD16Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":355
 *     return ccuda._cuMemsetD16Async(dstDevice, us, N, hStream)
 * 
 * cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD32Async(dstDevice, ui, N, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD32Async(CUdeviceptr __pyx_v_dstDevice, unsigned int __pyx_v_ui, size_t __pyx_v_N, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD32Async", __pyx_f[0], 355, 1, __PYX_ERR(0, 355, __pyx_L1_error));

  /* "cuda/ccuda.pyx":356
 * 
 * cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD32Async(dstDevice, ui, N, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32Async(__pyx_v_dstDevice, __pyx_v_ui, __pyx_v_N, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 356, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":355
 *     return ccuda._cuMemsetD16Async(dstDevice, us, N, hStream)
 * 
 * cdef CUresult cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD32Async(dstDevice, ui, N, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD32Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":358
 *     return ccuda._cuMemsetD32Async(dstDevice, ui, N, hStream)
 * 
 * cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD2D8Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned char __pyx_v_uc, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD2D8Async", __pyx_f[0], 358, 1, __PYX_ERR(0, 358, __pyx_L1_error));

  /* "cuda/ccuda.pyx":359
 * 
 * cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_uc, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 359, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":358
 *     return ccuda._cuMemsetD32Async(dstDevice, ui, N, hStream)
 * 
 * cdef CUresult cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD2D8Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":361
 *     return ccuda._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream)
 * 
 * cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD2D16Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned short __pyx_v_us, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD2D16Async", __pyx_f[0], 361, 1, __PYX_ERR(0, 361, __pyx_L1_error));

  /* "cuda/ccuda.pyx":362
 * 
 * cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16Async(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_us, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 362, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":361
 *     return ccuda._cuMemsetD2D8Async(dstDevice, dstPitch, uc, Width, Height, hStream)
 * 
 * cdef CUresult cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD2D16Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":364
 *     return ccuda._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream)
 * 
 * cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemsetD2D32Async(CUdeviceptr __pyx_v_dstDevice, size_t __pyx_v_dstPitch, unsigned int __pyx_v_ui, size_t __pyx_v_Width, size_t __pyx_v_Height, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemsetD2D32Async", __pyx_f[0], 364, 1, __PYX_ERR(0, 364, __pyx_L1_error));

  /* "cuda/ccuda.pyx":365
 * 
 * cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32Async(__pyx_v_dstDevice, __pyx_v_dstPitch, __pyx_v_ui, __pyx_v_Width, __pyx_v_Height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 365, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":364
 *     return ccuda._cuMemsetD2D16Async(dstDevice, dstPitch, us, Width, Height, hStream)
 * 
 * cdef CUresult cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemsetD2D32Async", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":367
 *     return ccuda._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream)
 * 
 * cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayCreate_v2(pHandle, pAllocateArray)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuArrayCreate(CUarray *__pyx_v_pHandle, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_pAllocateArray) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuArrayCreate", __pyx_f[0], 367, 1, __PYX_ERR(0, 367, __pyx_L1_error));

  /* "cuda/ccuda.pyx":368
 * 
 * cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuArrayCreate_v2(pHandle, pAllocateArray)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArrayCreate_v2(__pyx_v_pHandle, __pyx_v_pAllocateArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 368, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":367
 *     return ccuda._cuMemsetD2D32Async(dstDevice, dstPitch, ui, Width, Height, hStream)
 * 
 * cdef CUresult cuArrayCreate(CUarray* pHandle, const CUDA_ARRAY_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayCreate_v2(pHandle, pAllocateArray)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":370
 *     return ccuda._cuArrayCreate_v2(pHandle, pAllocateArray)
 * 
 * cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR *__pyx_v_pArrayDescriptor, CUarray __pyx_v_hArray) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuArrayGetDescriptor", __pyx_f[0], 370, 1, __PYX_ERR(0, 370, __pyx_L1_error));

  /* "cuda/ccuda.pyx":371
 * 
 * cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetDescriptor_v2(__pyx_v_pArrayDescriptor, __pyx_v_hArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 371, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":370
 *     return ccuda._cuArrayCreate_v2(pHandle, pAllocateArray)
 * 
 * cdef CUresult cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuArrayGetDescriptor", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":373
 *     return ccuda._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray)
 * 
 * cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayGetSparseProperties(sparseProperties, array)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, CUarray __pyx_v_array) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuArrayGetSparseProperties", __pyx_f[0], 373, 1, __PYX_ERR(0, 373, __pyx_L1_error));

  /* "cuda/ccuda.pyx":374
 * 
 * cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuArrayGetSparseProperties(sparseProperties, array)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_array); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 374, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":373
 *     return ccuda._cuArrayGetDescriptor_v2(pArrayDescriptor, hArray)
 * 
 * cdef CUresult cuArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUarray array) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayGetSparseProperties(sparseProperties, array)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":376
 *     return ccuda._cuArrayGetSparseProperties(sparseProperties, array)
 * 
 * cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES *__pyx_v_sparseProperties, CUmipmappedArray __pyx_v_mipmap) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMipmappedArrayGetSparseProperties", __pyx_f[0], 376, 1, __PYX_ERR(0, 376, __pyx_L1_error));

  /* "cuda/ccuda.pyx":377
 * 
 * cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetSparseProperties(__pyx_v_sparseProperties, __pyx_v_mipmap); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 377, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":376
 *     return ccuda._cuArrayGetSparseProperties(sparseProperties, array)
 * 
 * cdef CUresult cuMipmappedArrayGetSparseProperties(CUDA_ARRAY_SPARSE_PROPERTIES* sparseProperties, CUmipmappedArray mipmap) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMipmappedArrayGetSparseProperties", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":379
 *     return ccuda._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap)
 * 
 * cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayGetMemoryRequirements(memoryRequirements, array, device)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, CUarray __pyx_v_array, CUdevice __pyx_v_device) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuArrayGetMemoryRequirements", __pyx_f[0], 379, 1, __PYX_ERR(0, 379, __pyx_L1_error));

  /* "cuda/ccuda.pyx":380
 * 
 * cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuArrayGetMemoryRequirements(memoryRequirements, array, device)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_array, __pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 380, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":379
 *     return ccuda._cuMipmappedArrayGetSparseProperties(sparseProperties, mipmap)
 * 
 * cdef CUresult cuArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUarray array, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayGetMemoryRequirements(memoryRequirements, array, device)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":382
 *     return ccuda._cuArrayGetMemoryRequirements(memoryRequirements, array, device)
 * 
 * cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS *__pyx_v_memoryRequirements, CUmipmappedArray __pyx_v_mipmap, CUdevice __pyx_v_device) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMipmappedArrayGetMemoryRequirements", __pyx_f[0], 382, 1, __PYX_ERR(0, 382, __pyx_L1_error));

  /* "cuda/ccuda.pyx":383
 * 
 * cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetMemoryRequirements(__pyx_v_memoryRequirements, __pyx_v_mipmap, __pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 383, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":382
 *     return ccuda._cuArrayGetMemoryRequirements(memoryRequirements, array, device)
 * 
 * cdef CUresult cuMipmappedArrayGetMemoryRequirements(CUDA_ARRAY_MEMORY_REQUIREMENTS* memoryRequirements, CUmipmappedArray mipmap, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMipmappedArrayGetMemoryRequirements", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":385
 *     return ccuda._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device)
 * 
 * cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayGetPlane(pPlaneArray, hArray, planeIdx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuArrayGetPlane(CUarray *__pyx_v_pPlaneArray, CUarray __pyx_v_hArray, unsigned int __pyx_v_planeIdx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuArrayGetPlane", __pyx_f[0], 385, 1, __PYX_ERR(0, 385, __pyx_L1_error));

  /* "cuda/ccuda.pyx":386
 * 
 * cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuArrayGetPlane(pPlaneArray, hArray, planeIdx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetPlane(__pyx_v_pPlaneArray, __pyx_v_hArray, __pyx_v_planeIdx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 386, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":385
 *     return ccuda._cuMipmappedArrayGetMemoryRequirements(memoryRequirements, mipmap, device)
 * 
 * cdef CUresult cuArrayGetPlane(CUarray* pPlaneArray, CUarray hArray, unsigned int planeIdx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayGetPlane(pPlaneArray, hArray, planeIdx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuArrayGetPlane", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":388
 *     return ccuda._cuArrayGetPlane(pPlaneArray, hArray, planeIdx)
 * 
 * cdef CUresult cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayDestroy(hArray)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuArrayDestroy(CUarray __pyx_v_hArray) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuArrayDestroy", __pyx_f[0], 388, 1, __PYX_ERR(0, 388, __pyx_L1_error));

  /* "cuda/ccuda.pyx":389
 * 
 * cdef CUresult cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuArrayDestroy(hArray)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArrayDestroy(__pyx_v_hArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 389, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":388
 *     return ccuda._cuArrayGetPlane(pPlaneArray, hArray, planeIdx)
 * 
 * cdef CUresult cuArrayDestroy(CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArrayDestroy(hArray)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":391
 *     return ccuda._cuArrayDestroy(hArray)
 * 
 * cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArray3DCreate_v2(pHandle, pAllocateArray)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuArray3DCreate(CUarray *__pyx_v_pHandle, CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pAllocateArray) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuArray3DCreate", __pyx_f[0], 391, 1, __PYX_ERR(0, 391, __pyx_L1_error));

  /* "cuda/ccuda.pyx":392
 * 
 * cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuArray3DCreate_v2(pHandle, pAllocateArray)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2(__pyx_v_pHandle, __pyx_v_pAllocateArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 392, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":391
 *     return ccuda._cuArrayDestroy(hArray)
 * 
 * cdef CUresult cuArray3DCreate(CUarray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pAllocateArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArray3DCreate_v2(pHandle, pAllocateArray)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuArray3DCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":394
 *     return ccuda._cuArray3DCreate_v2(pHandle, pAllocateArray)
 * 
 * cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR *__pyx_v_pArrayDescriptor, CUarray __pyx_v_hArray) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuArray3DGetDescriptor", __pyx_f[0], 394, 1, __PYX_ERR(0, 394, __pyx_L1_error));

  /* "cuda/ccuda.pyx":395
 * 
 * cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2(__pyx_v_pArrayDescriptor, __pyx_v_hArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 395, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":394
 *     return ccuda._cuArray3DCreate_v2(pHandle, pAllocateArray)
 * 
 * cdef CUresult cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR* pArrayDescriptor, CUarray hArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuArray3DGetDescriptor", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":397
 *     return ccuda._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray)
 * 
 * cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMipmappedArrayCreate(CUmipmappedArray *__pyx_v_pHandle, CUDA_ARRAY3D_DESCRIPTOR const *__pyx_v_pMipmappedArrayDesc, unsigned int __pyx_v_numMipmapLevels) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMipmappedArrayCreate", __pyx_f[0], 397, 1, __PYX_ERR(0, 397, __pyx_L1_error));

  /* "cuda/ccuda.pyx":398
 * 
 * cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate(__pyx_v_pHandle, __pyx_v_pMipmappedArrayDesc, __pyx_v_numMipmapLevels); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 398, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":397
 *     return ccuda._cuArray3DGetDescriptor_v2(pArrayDescriptor, hArray)
 * 
 * cdef CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle, const CUDA_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, unsigned int numMipmapLevels) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMipmappedArrayCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":400
 *     return ccuda._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 * 
 * cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMipmappedArrayGetLevel(CUarray *__pyx_v_pLevelArray, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_level) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMipmappedArrayGetLevel", __pyx_f[0], 400, 1, __PYX_ERR(0, 400, __pyx_L1_error));

  /* "cuda/ccuda.pyx":401
 * 
 * cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel(__pyx_v_pLevelArray, __pyx_v_hMipmappedArray, __pyx_v_level); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 401, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":400
 *     return ccuda._cuMipmappedArrayCreate(pHandle, pMipmappedArrayDesc, numMipmapLevels)
 * 
 * cdef CUresult cuMipmappedArrayGetLevel(CUarray* pLevelArray, CUmipmappedArray hMipmappedArray, unsigned int level) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMipmappedArrayGetLevel", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":403
 *     return ccuda._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level)
 * 
 * cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayDestroy(hMipmappedArray)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMipmappedArrayDestroy(CUmipmappedArray __pyx_v_hMipmappedArray) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMipmappedArrayDestroy", __pyx_f[0], 403, 1, __PYX_ERR(0, 403, __pyx_L1_error));

  /* "cuda/ccuda.pyx":404
 * 
 * cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMipmappedArrayDestroy(hMipmappedArray)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayDestroy(__pyx_v_hMipmappedArray); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 404, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":403
 *     return ccuda._cuMipmappedArrayGetLevel(pLevelArray, hMipmappedArray, level)
 * 
 * cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMipmappedArrayDestroy(hMipmappedArray)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMipmappedArrayDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":406
 *     return ccuda._cuMipmappedArrayDestroy(hMipmappedArray)
 * 
 * cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetHandleForAddressRange(void *__pyx_v_handle, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_size, CUmemRangeHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemGetHandleForAddressRange", __pyx_f[0], 406, 1, __PYX_ERR(0, 406, __pyx_L1_error));

  /* "cuda/ccuda.pyx":407
 * 
 * cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetHandleForAddressRange(__pyx_v_handle, __pyx_v_dptr, __pyx_v_size, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 407, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":406
 *     return ccuda._cuMipmappedArrayDestroy(hMipmappedArray)
 * 
 * cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemGetHandleForAddressRange", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":409
 *     return ccuda._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags)
 * 
 * cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAddressReserve(ptr, size, alignment, addr, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAddressReserve(CUdeviceptr *__pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_alignment, CUdeviceptr __pyx_v_addr, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAddressReserve", __pyx_f[0], 409, 1, __PYX_ERR(0, 409, __pyx_L1_error));

  /* "cuda/ccuda.pyx":410
 * 
 * cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAddressReserve(ptr, size, alignment, addr, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressReserve(__pyx_v_ptr, __pyx_v_size, __pyx_v_alignment, __pyx_v_addr, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 410, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":409
 *     return ccuda._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags)
 * 
 * cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAddressReserve(ptr, size, alignment, addr, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAddressReserve", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":412
 *     return ccuda._cuMemAddressReserve(ptr, size, alignment, addr, flags)
 * 
 * cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAddressFree(ptr, size)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAddressFree(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAddressFree", __pyx_f[0], 412, 1, __PYX_ERR(0, 412, __pyx_L1_error));

  /* "cuda/ccuda.pyx":413
 * 
 * cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAddressFree(ptr, size)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressFree(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 413, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":412
 *     return ccuda._cuMemAddressReserve(ptr, size, alignment, addr, flags)
 * 
 * cdef CUresult cuMemAddressFree(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAddressFree(ptr, size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAddressFree", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":415
 *     return ccuda._cuMemAddressFree(ptr, size)
 * 
 * cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemCreate(handle, size, prop, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemCreate(CUmemGenericAllocationHandle *__pyx_v_handle, size_t __pyx_v_size, CUmemAllocationProp const *__pyx_v_prop, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemCreate", __pyx_f[0], 415, 1, __PYX_ERR(0, 415, __pyx_L1_error));

  /* "cuda/ccuda.pyx":416
 * 
 * cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemCreate(handle, size, prop, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemCreate(__pyx_v_handle, __pyx_v_size, __pyx_v_prop, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 416, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":415
 *     return ccuda._cuMemAddressFree(ptr, size)
 * 
 * cdef CUresult cuMemCreate(CUmemGenericAllocationHandle* handle, size_t size, const CUmemAllocationProp* prop, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemCreate(handle, size, prop, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":418
 *     return ccuda._cuMemCreate(handle, size, prop, flags)
 * 
 * cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRelease(handle)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemRelease(CUmemGenericAllocationHandle __pyx_v_handle) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemRelease", __pyx_f[0], 418, 1, __PYX_ERR(0, 418, __pyx_L1_error));

  /* "cuda/ccuda.pyx":419
 * 
 * cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemRelease(handle)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemRelease(__pyx_v_handle); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 419, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":418
 *     return ccuda._cuMemCreate(handle, size, prop, flags)
 * 
 * cdef CUresult cuMemRelease(CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRelease(handle)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":421
 *     return ccuda._cuMemRelease(handle)
 * 
 * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemMap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, size_t __pyx_v_offset, CUmemGenericAllocationHandle __pyx_v_handle, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemMap", __pyx_f[0], 421, 1, __PYX_ERR(0, 421, __pyx_L1_error));

  /* "cuda/ccuda.pyx":422
 * 
 * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemMap(__pyx_v_ptr, __pyx_v_size, __pyx_v_offset, __pyx_v_handle, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 422, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":421
 *     return ccuda._cuMemRelease(handle)
 * 
 * cdef CUresult cuMemMap(CUdeviceptr ptr, size_t size, size_t offset, CUmemGenericAllocationHandle handle, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemMap", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":424
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)
 * 
 * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemMapArrayAsync(CUarrayMapInfo *__pyx_v_mapInfoList, unsigned int __pyx_v_count, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemMapArrayAsync", __pyx_f[0], 424, 1, __PYX_ERR(0, 424, __pyx_L1_error));

  /* "cuda/ccuda.pyx":425
 * 
 * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemMapArrayAsync(__pyx_v_mapInfoList, __pyx_v_count, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 425, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":424
 *     return ccuda._cuMemMap(ptr, size, offset, handle, flags)
 * 
 * cdef CUresult cuMemMapArrayAsync(CUarrayMapInfo* mapInfoList, unsigned int count, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemMapArrayAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":427
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)
 * 
 * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemUnmap(ptr, size)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemUnmap(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemUnmap", __pyx_f[0], 427, 1, __PYX_ERR(0, 427, __pyx_L1_error));

  /* "cuda/ccuda.pyx":428
 * 
 * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemUnmap(ptr, size)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap(__pyx_v_ptr, __pyx_v_size); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 428, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":427
 *     return ccuda._cuMemMapArrayAsync(mapInfoList, count, hStream)
 * 
 * cdef CUresult cuMemUnmap(CUdeviceptr ptr, size_t size) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemUnmap(ptr, size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemUnmap", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":430
 *     return ccuda._cuMemUnmap(ptr, size)
 * 
 * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemSetAccess(CUdeviceptr __pyx_v_ptr, size_t __pyx_v_size, CUmemAccessDesc const *__pyx_v_desc, size_t __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemSetAccess", __pyx_f[0], 430, 1, __PYX_ERR(0, 430, __pyx_L1_error));

  /* "cuda/ccuda.pyx":431
 * 
 * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess(__pyx_v_ptr, __pyx_v_size, __pyx_v_desc, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 431, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":430
 *     return ccuda._cuMemUnmap(ptr, size)
 * 
 * cdef CUresult cuMemSetAccess(CUdeviceptr ptr, size_t size, const CUmemAccessDesc* desc, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":433
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)
 * 
 * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAccess(flags, location, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetAccess(unsigned PY_LONG_LONG *__pyx_v_flags, CUmemLocation const *__pyx_v_location, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemGetAccess", __pyx_f[0], 433, 1, __PYX_ERR(0, 433, __pyx_L1_error));

  /* "cuda/ccuda.pyx":434
 * 
 * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemGetAccess(flags, location, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAccess(__pyx_v_flags, __pyx_v_location, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 434, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":433
 *     return ccuda._cuMemSetAccess(ptr, size, desc, count)
 * 
 * cdef CUresult cuMemGetAccess(unsigned long long* flags, const CUmemLocation* location, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAccess(flags, location, ptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":436
 *     return ccuda._cuMemGetAccess(flags, location, ptr)
 * 
 * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemExportToShareableHandle(void *__pyx_v_shareableHandle, CUmemGenericAllocationHandle __pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemExportToShareableHandle", __pyx_f[0], 436, 1, __PYX_ERR(0, 436, __pyx_L1_error));

  /* "cuda/ccuda.pyx":437
 * 
 * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle(__pyx_v_shareableHandle, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 437, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":436
 *     return ccuda._cuMemGetAccess(flags, location, ptr)
 * 
 * cdef CUresult cuMemExportToShareableHandle(void* shareableHandle, CUmemGenericAllocationHandle handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":439
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)
 * 
 * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemImportFromShareableHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_osHandle, CUmemAllocationHandleType __pyx_v_shHandleType) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemImportFromShareableHandle", __pyx_f[0], 439, 1, __PYX_ERR(0, 439, __pyx_L1_error));

  /* "cuda/ccuda.pyx":440
 * 
 * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemImportFromShareableHandle(__pyx_v_handle, __pyx_v_osHandle, __pyx_v_shHandleType); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 440, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":439
 *     return ccuda._cuMemExportToShareableHandle(shareableHandle, handle, handleType, flags)
 * 
 * cdef CUresult cuMemImportFromShareableHandle(CUmemGenericAllocationHandle* handle, void* osHandle, CUmemAllocationHandleType shHandleType) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":442
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)
 * 
 * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetAllocationGranularity(size_t *__pyx_v_granularity, CUmemAllocationProp const *__pyx_v_prop, CUmemAllocationGranularity_flags __pyx_v_option) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemGetAllocationGranularity", __pyx_f[0], 442, 1, __PYX_ERR(0, 442, __pyx_L1_error));

  /* "cuda/ccuda.pyx":443
 * 
 * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity(__pyx_v_granularity, __pyx_v_prop, __pyx_v_option); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 443, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":442
 *     return ccuda._cuMemImportFromShareableHandle(handle, osHandle, shHandleType)
 * 
 * cdef CUresult cuMemGetAllocationGranularity(size_t* granularity, const CUmemAllocationProp* prop, CUmemAllocationGranularity_flags option) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemGetAllocationGranularity", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":445
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)
 * 
 * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp *__pyx_v_prop, CUmemGenericAllocationHandle __pyx_v_handle) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemGetAllocationPropertiesFromHandle", __pyx_f[0], 445, 1, __PYX_ERR(0, 445, __pyx_L1_error));

  /* "cuda/ccuda.pyx":446
 * 
 * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle(__pyx_v_prop, __pyx_v_handle); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 446, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":445
 *     return ccuda._cuMemGetAllocationGranularity(granularity, prop, option)
 * 
 * cdef CUresult cuMemGetAllocationPropertiesFromHandle(CUmemAllocationProp* prop, CUmemGenericAllocationHandle handle) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemGetAllocationPropertiesFromHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":448
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)
 * 
 * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemRetainAllocationHandle(CUmemGenericAllocationHandle *__pyx_v_handle, void *__pyx_v_addr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemRetainAllocationHandle", __pyx_f[0], 448, 1, __PYX_ERR(0, 448, __pyx_L1_error));

  /* "cuda/ccuda.pyx":449
 * 
 * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle(__pyx_v_handle, __pyx_v_addr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 449, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":448
 *     return ccuda._cuMemGetAllocationPropertiesFromHandle(prop, handle)
 * 
 * cdef CUresult cuMemRetainAllocationHandle(CUmemGenericAllocationHandle* handle, void* addr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemRetainAllocationHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":451
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)
 * 
 * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemFreeAsync(dptr, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemFreeAsync(CUdeviceptr __pyx_v_dptr, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemFreeAsync", __pyx_f[0], 451, 1, __PYX_ERR(0, 451, __pyx_L1_error));

  /* "cuda/ccuda.pyx":452
 * 
 * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemFreeAsync(dptr, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync(__pyx_v_dptr, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 452, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":451
 *     return ccuda._cuMemRetainAllocationHandle(handle, addr)
 * 
 * cdef CUresult cuMemFreeAsync(CUdeviceptr dptr, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemFreeAsync(dptr, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemFreeAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":454
 *     return ccuda._cuMemFreeAsync(dptr, hStream)
 * 
 * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAllocAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAllocAsync", __pyx_f[0], 454, 1, __PYX_ERR(0, 454, __pyx_L1_error));

  /* "cuda/ccuda.pyx":455
 * 
 * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 455, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":454
 *     return ccuda._cuMemFreeAsync(dptr, hStream)
 * 
 * cdef CUresult cuMemAllocAsync(CUdeviceptr* dptr, size_t bytesize, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAllocAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":457
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)
 * 
 * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolTrimTo(CUmemoryPool __pyx_v_pool, size_t __pyx_v_minBytesToKeep) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolTrimTo", __pyx_f[0], 457, 1, __PYX_ERR(0, 457, __pyx_L1_error));

  /* "cuda/ccuda.pyx":458
 * 
 * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo(__pyx_v_pool, __pyx_v_minBytesToKeep); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 458, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":457
 *     return ccuda._cuMemAllocAsync(dptr, bytesize, hStream)
 * 
 * cdef CUresult cuMemPoolTrimTo(CUmemoryPool pool, size_t minBytesToKeep) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolTrimTo", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":460
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)
 * 
 * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolSetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolSetAttribute", __pyx_f[0], 460, 1, __PYX_ERR(0, 460, __pyx_L1_error));

  /* "cuda/ccuda.pyx":461
 * 
 * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute(__pyx_v_pool, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 461, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":460
 *     return ccuda._cuMemPoolTrimTo(pool, minBytesToKeep)
 * 
 * cdef CUresult cuMemPoolSetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":463
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)
 * 
 * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolGetAttribute(CUmemoryPool __pyx_v_pool, CUmemPool_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolGetAttribute", __pyx_f[0], 463, 1, __PYX_ERR(0, 463, __pyx_L1_error));

  /* "cuda/ccuda.pyx":464
 * 
 * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute(__pyx_v_pool, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 464, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":463
 *     return ccuda._cuMemPoolSetAttribute(pool, attr, value)
 * 
 * cdef CUresult cuMemPoolGetAttribute(CUmemoryPool pool, CUmemPool_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":466
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)
 * 
 * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolSetAccess(CUmemoryPool __pyx_v_pool, CUmemAccessDesc const *__pyx_v_map, size_t __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolSetAccess", __pyx_f[0], 466, 1, __PYX_ERR(0, 466, __pyx_L1_error));

  /* "cuda/ccuda.pyx":467
 * 
 * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess(__pyx_v_pool, __pyx_v_map, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 467, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":466
 *     return ccuda._cuMemPoolGetAttribute(pool, attr, value)
 * 
 * cdef CUresult cuMemPoolSetAccess(CUmemoryPool pool, const CUmemAccessDesc* map, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolSetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":469
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)
 * 
 * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolGetAccess(CUmemAccess_flags *__pyx_v_flags, CUmemoryPool __pyx_v_memPool, CUmemLocation *__pyx_v_location) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolGetAccess", __pyx_f[0], 469, 1, __PYX_ERR(0, 469, __pyx_L1_error));

  /* "cuda/ccuda.pyx":470
 * 
 * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAccess(__pyx_v_flags, __pyx_v_memPool, __pyx_v_location); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 470, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":469
 *     return ccuda._cuMemPoolSetAccess(pool, map, count)
 * 
 * cdef CUresult cuMemPoolGetAccess(CUmemAccess_flags* flags, CUmemoryPool memPool, CUmemLocation* location) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolGetAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":472
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)
 * 
 * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolCreate(pool, poolProps)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolCreate(CUmemoryPool *__pyx_v_pool, CUmemPoolProps const *__pyx_v_poolProps) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolCreate", __pyx_f[0], 472, 1, __PYX_ERR(0, 472, __pyx_L1_error));

  /* "cuda/ccuda.pyx":473
 * 
 * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolCreate(pool, poolProps)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate(__pyx_v_pool, __pyx_v_poolProps); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 473, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":472
 *     return ccuda._cuMemPoolGetAccess(flags, memPool, location)
 * 
 * cdef CUresult cuMemPoolCreate(CUmemoryPool* pool, const CUmemPoolProps* poolProps) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolCreate(pool, poolProps)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":475
 *     return ccuda._cuMemPoolCreate(pool, poolProps)
 * 
 * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolDestroy(pool)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolDestroy(CUmemoryPool __pyx_v_pool) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolDestroy", __pyx_f[0], 475, 1, __PYX_ERR(0, 475, __pyx_L1_error));

  /* "cuda/ccuda.pyx":476
 * 
 * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolDestroy(pool)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy(__pyx_v_pool); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 476, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":475
 *     return ccuda._cuMemPoolCreate(pool, poolProps)
 * 
 * cdef CUresult cuMemPoolDestroy(CUmemoryPool pool) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolDestroy(pool)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":478
 *     return ccuda._cuMemPoolDestroy(pool)
 * 
 * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAllocFromPoolAsync(CUdeviceptr *__pyx_v_dptr, size_t __pyx_v_bytesize, CUmemoryPool __pyx_v_pool, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAllocFromPoolAsync", __pyx_f[0], 478, 1, __PYX_ERR(0, 478, __pyx_L1_error));

  /* "cuda/ccuda.pyx":479
 * 
 * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync(__pyx_v_dptr, __pyx_v_bytesize, __pyx_v_pool, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 479, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":478
 *     return ccuda._cuMemPoolDestroy(pool)
 * 
 * cdef CUresult cuMemAllocFromPoolAsync(CUdeviceptr* dptr, size_t bytesize, CUmemoryPool pool, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAllocFromPoolAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":481
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)
 * 
 * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolExportToShareableHandle(void *__pyx_v_handle_out, CUmemoryPool __pyx_v_pool, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolExportToShareableHandle", __pyx_f[0], 481, 1, __PYX_ERR(0, 481, __pyx_L1_error));

  /* "cuda/ccuda.pyx":482
 * 
 * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle(__pyx_v_handle_out, __pyx_v_pool, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 482, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":481
 *     return ccuda._cuMemAllocFromPoolAsync(dptr, bytesize, pool, hStream)
 * 
 * cdef CUresult cuMemPoolExportToShareableHandle(void* handle_out, CUmemoryPool pool, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolExportToShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":484
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)
 * 
 * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolImportFromShareableHandle(CUmemoryPool *__pyx_v_pool_out, void *__pyx_v_handle, CUmemAllocationHandleType __pyx_v_handleType, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolImportFromShareableHandle", __pyx_f[0], 484, 1, __PYX_ERR(0, 484, __pyx_L1_error));

  /* "cuda/ccuda.pyx":485
 * 
 * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportFromShareableHandle(__pyx_v_pool_out, __pyx_v_handle, __pyx_v_handleType, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 485, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":484
 *     return ccuda._cuMemPoolExportToShareableHandle(handle_out, pool, handleType, flags)
 * 
 * cdef CUresult cuMemPoolImportFromShareableHandle(CUmemoryPool* pool_out, void* handle, CUmemAllocationHandleType handleType, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolImportFromShareableHandle", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":487
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)
 * 
 * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolExportPointer(CUmemPoolPtrExportData *__pyx_v_shareData_out, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolExportPointer", __pyx_f[0], 487, 1, __PYX_ERR(0, 487, __pyx_L1_error));

  /* "cuda/ccuda.pyx":488
 * 
 * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportPointer(__pyx_v_shareData_out, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 488, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":487
 *     return ccuda._cuMemPoolImportFromShareableHandle(pool_out, handle, handleType, flags)
 * 
 * cdef CUresult cuMemPoolExportPointer(CUmemPoolPtrExportData* shareData_out, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolExportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":490
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)
 * 
 * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPoolImportPointer(CUdeviceptr *__pyx_v_ptr_out, CUmemoryPool __pyx_v_pool, CUmemPoolPtrExportData *__pyx_v_shareData) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPoolImportPointer", __pyx_f[0], 490, 1, __PYX_ERR(0, 490, __pyx_L1_error));

  /* "cuda/ccuda.pyx":491
 * 
 * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer(__pyx_v_ptr_out, __pyx_v_pool, __pyx_v_shareData); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 491, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":490
 *     return ccuda._cuMemPoolExportPointer(shareData_out, ptr)
 * 
 * cdef CUresult cuMemPoolImportPointer(CUdeviceptr* ptr_out, CUmemoryPool pool, CUmemPoolPtrExportData* shareData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPoolImportPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":493
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)
 * 
 * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuPointerGetAttribute(void *__pyx_v_data, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuPointerGetAttribute", __pyx_f[0], 493, 1, __PYX_ERR(0, 493, __pyx_L1_error));

  /* "cuda/ccuda.pyx":494
 * 
 * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute(__pyx_v_data, __pyx_v_attribute, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 494, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":493
 *     return ccuda._cuMemPoolImportPointer(ptr_out, pool, shareData)
 * 
 * cdef CUresult cuPointerGetAttribute(void* data, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuPointerGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":496
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)
 * 
 * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemPrefetchAsync(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUdevice __pyx_v_dstDevice, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemPrefetchAsync", __pyx_f[0], 496, 1, __PYX_ERR(0, 496, __pyx_L1_error));

  /* "cuda/ccuda.pyx":497
 * 
 * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync(__pyx_v_devPtr, __pyx_v_count, __pyx_v_dstDevice, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 497, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":496
 *     return ccuda._cuPointerGetAttribute(data, attribute, ptr)
 * 
 * cdef CUresult cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemPrefetchAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":499
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)
 * 
 * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemAdvise(CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count, CUmem_advise __pyx_v_advice, CUdevice __pyx_v_device) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemAdvise", __pyx_f[0], 499, 1, __PYX_ERR(0, 499, __pyx_L1_error));

  /* "cuda/ccuda.pyx":500
 * 
 * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise(__pyx_v_devPtr, __pyx_v_count, __pyx_v_advice, __pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 500, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":499
 *     return ccuda._cuMemPrefetchAsync(devPtr, count, dstDevice, hStream)
 * 
 * cdef CUresult cuMemAdvise(CUdeviceptr devPtr, size_t count, CUmem_advise advice, CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemAdvise", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":502
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)
 * 
 * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemRangeGetAttribute(void *__pyx_v_data, size_t __pyx_v_dataSize, CUmem_range_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemRangeGetAttribute", __pyx_f[0], 502, 1, __PYX_ERR(0, 502, __pyx_L1_error));

  /* "cuda/ccuda.pyx":503
 * 
 * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute(__pyx_v_data, __pyx_v_dataSize, __pyx_v_attribute, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 503, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":502
 *     return ccuda._cuMemAdvise(devPtr, count, advice, device)
 * 
 * cdef CUresult cuMemRangeGetAttribute(void* data, size_t dataSize, CUmem_range_attribute attribute, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemRangeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":505
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
 * 
 * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuMemRangeGetAttributes(void **__pyx_v_data, size_t *__pyx_v_dataSizes, CUmem_range_attribute *__pyx_v_attributes, size_t __pyx_v_numAttributes, CUdeviceptr __pyx_v_devPtr, size_t __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuMemRangeGetAttributes", __pyx_f[0], 505, 1, __PYX_ERR(0, 505, __pyx_L1_error));

  /* "cuda/ccuda.pyx":506
 * 
 * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes(__pyx_v_data, __pyx_v_dataSizes, __pyx_v_attributes, __pyx_v_numAttributes, __pyx_v_devPtr, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 506, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":505
 *     return ccuda._cuMemRangeGetAttribute(data, dataSize, attribute, devPtr, count)
 * 
 * cdef CUresult cuMemRangeGetAttributes(void** data, size_t* dataSizes, CUmem_range_attribute* attributes, size_t numAttributes, CUdeviceptr devPtr, size_t count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuMemRangeGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":508
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
 * 
 * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuPointerSetAttribute(void const *__pyx_v_value, CUpointer_attribute __pyx_v_attribute, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuPointerSetAttribute", __pyx_f[0], 508, 1, __PYX_ERR(0, 508, __pyx_L1_error));

  /* "cuda/ccuda.pyx":509
 * 
 * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute(__pyx_v_value, __pyx_v_attribute, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 509, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":508
 *     return ccuda._cuMemRangeGetAttributes(data, dataSizes, attributes, numAttributes, devPtr, count)
 * 
 * cdef CUresult cuPointerSetAttribute(const void* value, CUpointer_attribute attribute, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuPointerSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":511
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)
 * 
 * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuPointerGetAttributes(unsigned int __pyx_v_numAttributes, CUpointer_attribute *__pyx_v_attributes, void **__pyx_v_data, CUdeviceptr __pyx_v_ptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuPointerGetAttributes", __pyx_f[0], 511, 1, __PYX_ERR(0, 511, __pyx_L1_error));

  /* "cuda/ccuda.pyx":512
 * 
 * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes(__pyx_v_numAttributes, __pyx_v_attributes, __pyx_v_data, __pyx_v_ptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 512, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":511
 *     return ccuda._cuPointerSetAttribute(value, attribute, ptr)
 * 
 * cdef CUresult cuPointerGetAttributes(unsigned int numAttributes, CUpointer_attribute* attributes, void** data, CUdeviceptr ptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuPointerGetAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":514
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)
 * 
 * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCreate(phStream, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamCreate(CUstream *__pyx_v_phStream, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamCreate", __pyx_f[0], 514, 1, __PYX_ERR(0, 514, __pyx_L1_error));

  /* "cuda/ccuda.pyx":515
 * 
 * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamCreate(phStream, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate(__pyx_v_phStream, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 515, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":514
 *     return ccuda._cuPointerGetAttributes(numAttributes, attributes, data, ptr)
 * 
 * cdef CUresult cuStreamCreate(CUstream* phStream, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCreate(phStream, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":517
 *     return ccuda._cuStreamCreate(phStream, Flags)
 * 
 * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamCreateWithPriority(CUstream *__pyx_v_phStream, unsigned int __pyx_v_flags, int __pyx_v_priority) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamCreateWithPriority", __pyx_f[0], 517, 1, __PYX_ERR(0, 517, __pyx_L1_error));

  /* "cuda/ccuda.pyx":518
 * 
 * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority(__pyx_v_phStream, __pyx_v_flags, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 518, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":517
 *     return ccuda._cuStreamCreate(phStream, Flags)
 * 
 * cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, int priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamCreateWithPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":520
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)
 * 
 * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetPriority(hStream, priority)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetPriority(CUstream __pyx_v_hStream, int *__pyx_v_priority) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamGetPriority", __pyx_f[0], 520, 1, __PYX_ERR(0, 520, __pyx_L1_error));

  /* "cuda/ccuda.pyx":521
 * 
 * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamGetPriority(hStream, priority)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetPriority(__pyx_v_hStream, __pyx_v_priority); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 521, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":520
 *     return ccuda._cuStreamCreateWithPriority(phStream, flags, priority)
 * 
 * cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetPriority(hStream, priority)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamGetPriority", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":523
 *     return ccuda._cuStreamGetPriority(hStream, priority)
 * 
 * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetFlags(hStream, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetFlags(CUstream __pyx_v_hStream, unsigned int *__pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamGetFlags", __pyx_f[0], 523, 1, __PYX_ERR(0, 523, __pyx_L1_error));

  /* "cuda/ccuda.pyx":524
 * 
 * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamGetFlags(hStream, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags(__pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 524, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":523
 *     return ccuda._cuStreamGetPriority(hStream, priority)
 * 
 * cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetFlags(hStream, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":526
 *     return ccuda._cuStreamGetFlags(hStream, flags)
 * 
 * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCtx(hStream, pctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetCtx(CUstream __pyx_v_hStream, CUcontext *__pyx_v_pctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamGetCtx", __pyx_f[0], 526, 1, __PYX_ERR(0, 526, __pyx_L1_error));

  /* "cuda/ccuda.pyx":527
 * 
 * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamGetCtx(hStream, pctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx(__pyx_v_hStream, __pyx_v_pctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 527, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":526
 *     return ccuda._cuStreamGetFlags(hStream, flags)
 * 
 * cdef CUresult cuStreamGetCtx(CUstream hStream, CUcontext* pctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCtx(hStream, pctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamGetCtx", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":529
 *     return ccuda._cuStreamGetCtx(hStream, pctx)
 * 
 * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWaitEvent(CUstream __pyx_v_hStream, CUevent __pyx_v_hEvent, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWaitEvent", __pyx_f[0], 529, 1, __PYX_ERR(0, 529, __pyx_L1_error));

  /* "cuda/ccuda.pyx":530
 * 
 * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent(__pyx_v_hStream, __pyx_v_hEvent, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 530, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":529
 *     return ccuda._cuStreamGetCtx(hStream, pctx)
 * 
 * cdef CUresult cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWaitEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":532
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)
 * 
 * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamAddCallback(CUstream __pyx_v_hStream, CUstreamCallback __pyx_v_callback, void *__pyx_v_userData, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamAddCallback", __pyx_f[0], 532, 1, __PYX_ERR(0, 532, __pyx_L1_error));

  /* "cuda/ccuda.pyx":533
 * 
 * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback(__pyx_v_hStream, __pyx_v_callback, __pyx_v_userData, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 533, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":532
 *     return ccuda._cuStreamWaitEvent(hStream, hEvent, Flags)
 * 
 * cdef CUresult cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void* userData, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamAddCallback", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":535
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)
 * 
 * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamBeginCapture(CUstream __pyx_v_hStream, CUstreamCaptureMode __pyx_v_mode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamBeginCapture", __pyx_f[0], 535, 1, __PYX_ERR(0, 535, __pyx_L1_error));

  /* "cuda/ccuda.pyx":536
 * 
 * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCapture_v2(__pyx_v_hStream, __pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 536, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":535
 *     return ccuda._cuStreamAddCallback(hStream, callback, userData, flags)
 * 
 * cdef CUresult cuStreamBeginCapture(CUstream hStream, CUstreamCaptureMode mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamBeginCapture", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":538
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)
 * 
 * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode *__pyx_v_mode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuThreadExchangeStreamCaptureMode", __pyx_f[0], 538, 1, __PYX_ERR(0, 538, __pyx_L1_error));

  /* "cuda/ccuda.pyx":539
 * 
 * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode(__pyx_v_mode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 539, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":538
 *     return ccuda._cuStreamBeginCapture_v2(hStream, mode)
 * 
 * cdef CUresult cuThreadExchangeStreamCaptureMode(CUstreamCaptureMode* mode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuThreadExchangeStreamCaptureMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":541
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)
 * 
 * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamEndCapture(CUstream __pyx_v_hStream, CUgraph *__pyx_v_phGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamEndCapture", __pyx_f[0], 541, 1, __PYX_ERR(0, 541, __pyx_L1_error));

  /* "cuda/ccuda.pyx":542
 * 
 * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture(__pyx_v_hStream, __pyx_v_phGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 542, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":541
 *     return ccuda._cuThreadExchangeStreamCaptureMode(mode)
 * 
 * cdef CUresult cuStreamEndCapture(CUstream hStream, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamEndCapture", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":544
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)
 * 
 * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamIsCapturing(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamIsCapturing", __pyx_f[0], 544, 1, __PYX_ERR(0, 544, __pyx_L1_error));

  /* "cuda/ccuda.pyx":545
 * 
 * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing(__pyx_v_hStream, __pyx_v_captureStatus); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 545, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":544
 *     return ccuda._cuStreamEndCapture(hStream, phGraph)
 * 
 * cdef CUresult cuStreamIsCapturing(CUstream hStream, CUstreamCaptureStatus* captureStatus) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamIsCapturing", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":547
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)
 * 
 * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCaptureInfo(hStream, captureStatus_out, id_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamGetCaptureInfo", __pyx_f[0], 547, 1, __PYX_ERR(0, 547, __pyx_L1_error));

  /* "cuda/ccuda.pyx":548
 * 
 * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamGetCaptureInfo(hStream, captureStatus_out, id_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 548, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":547
 *     return ccuda._cuStreamIsCapturing(hStream, captureStatus)
 * 
 * cdef CUresult cuStreamGetCaptureInfo(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCaptureInfo(hStream, captureStatus_out, id_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamGetCaptureInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":550
 *     return ccuda._cuStreamGetCaptureInfo(hStream, captureStatus_out, id_out)
 * 
 * cdef CUresult cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo_v2(CUstream __pyx_v_hStream, CUstreamCaptureStatus *__pyx_v_captureStatus_out, cuuint64_t *__pyx_v_id_out, CUgraph *__pyx_v_graph_out, CUgraphNode const **__pyx_v_dependencies_out, size_t *__pyx_v_numDependencies_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamGetCaptureInfo_v2", __pyx_f[0], 550, 1, __PYX_ERR(0, 550, __pyx_L1_error));

  /* "cuda/ccuda.pyx":551
 * 
 * cdef CUresult cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2(__pyx_v_hStream, __pyx_v_captureStatus_out, __pyx_v_id_out, __pyx_v_graph_out, __pyx_v_dependencies_out, __pyx_v_numDependencies_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 551, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":550
 *     return ccuda._cuStreamGetCaptureInfo(hStream, captureStatus_out, id_out)
 * 
 * cdef CUresult cuStreamGetCaptureInfo_v2(CUstream hStream, CUstreamCaptureStatus* captureStatus_out, cuuint64_t* id_out, CUgraph* graph_out, const CUgraphNode** dependencies_out, size_t* numDependencies_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamGetCaptureInfo_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":553
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamUpdateCaptureDependencies(CUstream __pyx_v_hStream, CUgraphNode *__pyx_v_dependencies, size_t __pyx_v_numDependencies, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamUpdateCaptureDependencies", __pyx_f[0], 553, 1, __PYX_ERR(0, 553, __pyx_L1_error));

  /* "cuda/ccuda.pyx":554
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies(__pyx_v_hStream, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 554, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":553
 *     return ccuda._cuStreamGetCaptureInfo_v2(hStream, captureStatus_out, id_out, graph_out, dependencies_out, numDependencies_out)
 * 
 * cdef CUresult cuStreamUpdateCaptureDependencies(CUstream hStream, CUgraphNode* dependencies, size_t numDependencies, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamUpdateCaptureDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":556
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)
 * 
 * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamAttachMemAsync(CUstream __pyx_v_hStream, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_length, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamAttachMemAsync", __pyx_f[0], 556, 1, __PYX_ERR(0, 556, __pyx_L1_error));

  /* "cuda/ccuda.pyx":557
 * 
 * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamAttachMemAsync(__pyx_v_hStream, __pyx_v_dptr, __pyx_v_length, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 557, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":556
 *     return ccuda._cuStreamUpdateCaptureDependencies(hStream, dependencies, numDependencies, flags)
 * 
 * cdef CUresult cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamAttachMemAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":559
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)
 * 
 * cdef CUresult cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamQuery(hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamQuery(CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamQuery", __pyx_f[0], 559, 1, __PYX_ERR(0, 559, __pyx_L1_error));

  /* "cuda/ccuda.pyx":560
 * 
 * cdef CUresult cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamQuery(hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamQuery(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 560, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":559
 *     return ccuda._cuStreamAttachMemAsync(hStream, dptr, length, flags)
 * 
 * cdef CUresult cuStreamQuery(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamQuery(hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamQuery", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":562
 *     return ccuda._cuStreamQuery(hStream)
 * 
 * cdef CUresult cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamSynchronize(hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamSynchronize(CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamSynchronize", __pyx_f[0], 562, 1, __PYX_ERR(0, 562, __pyx_L1_error));

  /* "cuda/ccuda.pyx":563
 * 
 * cdef CUresult cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamSynchronize(hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamDestroy(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 563, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":562
 *     return ccuda._cuStreamQuery(hStream)
 * 
 * cdef CUresult cuStreamSynchronize(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamSynchronize(hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":565
 *     return ccuda._cuStreamSynchronize(hStream)
 * 
 * cdef CUresult cuStreamDestroy(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamDestroy_v2(hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamDestroy(CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamDestroy", __pyx_f[0], 565, 1, __PYX_ERR(0, 565, __pyx_L1_error));

  /* "cuda/ccuda.pyx":566
 * 
 * cdef CUresult cuStreamDestroy(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamDestroy_v2(hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2(__pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 566, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":565
 *     return ccuda._cuStreamSynchronize(hStream)
 * 
 * cdef CUresult cuStreamDestroy(CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamDestroy_v2(hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":568
 *     return ccuda._cuStreamDestroy_v2(hStream)
 * 
 * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCopyAttributes(dst, src)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamCopyAttributes(CUstream __pyx_v_dst, CUstream __pyx_v_src) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamCopyAttributes", __pyx_f[0], 568, 1, __PYX_ERR(0, 568, __pyx_L1_error));

  /* "cuda/ccuda.pyx":569
 * 
 * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamCopyAttributes(dst, src)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 569, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":568
 *     return ccuda._cuStreamDestroy_v2(hStream)
 * 
 * cdef CUresult cuStreamCopyAttributes(CUstream dst, CUstream src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamCopyAttributes(dst, src)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":571
 *     return ccuda._cuStreamCopyAttributes(dst, src)
 * 
 * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamGetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue *__pyx_v_value_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamGetAttribute", __pyx_f[0], 571, 1, __PYX_ERR(0, 571, __pyx_L1_error));

  /* "cuda/ccuda.pyx":572
 * 
 * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 572, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":571
 *     return ccuda._cuStreamCopyAttributes(dst, src)
 * 
 * cdef CUresult cuStreamGetAttribute(CUstream hStream, CUstreamAttrID attr, CUstreamAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":574
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)
 * 
 * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamSetAttribute(CUstream __pyx_v_hStream, CUstreamAttrID __pyx_v_attr, CUstreamAttrValue const *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamSetAttribute", __pyx_f[0], 574, 1, __PYX_ERR(0, 574, __pyx_L1_error));

  /* "cuda/ccuda.pyx":575
 * 
 * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute(__pyx_v_hStream, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 575, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":574
 *     return ccuda._cuStreamGetAttribute(hStream, attr, value_out)
 * 
 * cdef CUresult cuStreamSetAttribute(CUstream hStream, CUstreamAttrID attr, const CUstreamAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":577
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)
 * 
 * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventCreate(phEvent, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventCreate(CUevent *__pyx_v_phEvent, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEventCreate", __pyx_f[0], 577, 1, __PYX_ERR(0, 577, __pyx_L1_error));

  /* "cuda/ccuda.pyx":578
 * 
 * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEventCreate(phEvent, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate(__pyx_v_phEvent, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 578, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":577
 *     return ccuda._cuStreamSetAttribute(hStream, attr, value)
 * 
 * cdef CUresult cuEventCreate(CUevent* phEvent, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventCreate(phEvent, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEventCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":580
 *     return ccuda._cuEventCreate(phEvent, Flags)
 * 
 * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventRecord(hEvent, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventRecord(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEventRecord", __pyx_f[0], 580, 1, __PYX_ERR(0, 580, __pyx_L1_error));

  /* "cuda/ccuda.pyx":581
 * 
 * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEventRecord(hEvent, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord(__pyx_v_hEvent, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 581, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":580
 *     return ccuda._cuEventCreate(phEvent, Flags)
 * 
 * cdef CUresult cuEventRecord(CUevent hEvent, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventRecord(hEvent, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEventRecord", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":583
 *     return ccuda._cuEventRecord(hEvent, hStream)
 * 
 * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventRecordWithFlags(CUevent __pyx_v_hEvent, CUstream __pyx_v_hStream, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEventRecordWithFlags", __pyx_f[0], 583, 1, __PYX_ERR(0, 583, __pyx_L1_error));

  /* "cuda/ccuda.pyx":584
 * 
 * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags(__pyx_v_hEvent, __pyx_v_hStream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 584, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":583
 *     return ccuda._cuEventRecord(hEvent, hStream)
 * 
 * cdef CUresult cuEventRecordWithFlags(CUevent hEvent, CUstream hStream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEventRecordWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":586
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)
 * 
 * cdef CUresult cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventQuery(hEvent)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventQuery(CUevent __pyx_v_hEvent) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEventQuery", __pyx_f[0], 586, 1, __PYX_ERR(0, 586, __pyx_L1_error));

  /* "cuda/ccuda.pyx":587
 * 
 * cdef CUresult cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEventQuery(hEvent)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 587, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":586
 *     return ccuda._cuEventRecordWithFlags(hEvent, hStream, flags)
 * 
 * cdef CUresult cuEventQuery(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventQuery(hEvent)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEventQuery", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":589
 *     return ccuda._cuEventQuery(hEvent)
 * 
 * cdef CUresult cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventSynchronize(hEvent)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventSynchronize(CUevent __pyx_v_hEvent) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEventSynchronize", __pyx_f[0], 589, 1, __PYX_ERR(0, 589, __pyx_L1_error));

  /* "cuda/ccuda.pyx":590
 * 
 * cdef CUresult cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEventSynchronize(hEvent)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventDestroy(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 590, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":589
 *     return ccuda._cuEventQuery(hEvent)
 * 
 * cdef CUresult cuEventSynchronize(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventSynchronize(hEvent)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEventSynchronize", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":592
 *     return ccuda._cuEventSynchronize(hEvent)
 * 
 * cdef CUresult cuEventDestroy(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventDestroy_v2(hEvent)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventDestroy(CUevent __pyx_v_hEvent) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEventDestroy", __pyx_f[0], 592, 1, __PYX_ERR(0, 592, __pyx_L1_error));

  /* "cuda/ccuda.pyx":593
 * 
 * cdef CUresult cuEventDestroy(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEventDestroy_v2(hEvent)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2(__pyx_v_hEvent); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 593, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":592
 *     return ccuda._cuEventSynchronize(hEvent)
 * 
 * cdef CUresult cuEventDestroy(CUevent hEvent) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventDestroy_v2(hEvent)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEventDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":595
 *     return ccuda._cuEventDestroy_v2(hEvent)
 * 
 * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventElapsedTime(float *__pyx_v_pMilliseconds, CUevent __pyx_v_hStart, CUevent __pyx_v_hEnd) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEventElapsedTime", __pyx_f[0], 595, 1, __PYX_ERR(0, 595, __pyx_L1_error));

  /* "cuda/ccuda.pyx":596
 * 
 * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime(__pyx_v_pMilliseconds, __pyx_v_hStart, __pyx_v_hEnd); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 596, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":595
 *     return ccuda._cuEventDestroy_v2(hEvent)
 * 
 * cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEventElapsedTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":598
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)
 * 
 * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuImportExternalMemory(CUexternalMemory *__pyx_v_extMem_out, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *__pyx_v_memHandleDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuImportExternalMemory", __pyx_f[0], 598, 1, __PYX_ERR(0, 598, __pyx_L1_error));

  /* "cuda/ccuda.pyx":599
 * 
 * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory(__pyx_v_extMem_out, __pyx_v_memHandleDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 599, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":598
 *     return ccuda._cuEventElapsedTime(pMilliseconds, hStart, hEnd)
 * 
 * cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuImportExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":601
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)
 * 
 * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedBuffer(CUdeviceptr *__pyx_v_devPtr, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *__pyx_v_bufferDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuExternalMemoryGetMappedBuffer", __pyx_f[0], 601, 1, __PYX_ERR(0, 601, __pyx_L1_error));

  /* "cuda/ccuda.pyx":602
 * 
 * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedBuffer(__pyx_v_devPtr, __pyx_v_extMem, __pyx_v_bufferDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 602, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":601
 *     return ccuda._cuImportExternalMemory(extMem_out, memHandleDesc)
 * 
 * cdef CUresult cuExternalMemoryGetMappedBuffer(CUdeviceptr* devPtr, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC* bufferDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuExternalMemoryGetMappedBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":604
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
 * 
 * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_mipmap, CUexternalMemory __pyx_v_extMem, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *__pyx_v_mipmapDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuExternalMemoryGetMappedMipmappedArray", __pyx_f[0], 604, 1, __PYX_ERR(0, 604, __pyx_L1_error));

  /* "cuda/ccuda.pyx":605
 * 
 * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedMipmappedArray(__pyx_v_mipmap, __pyx_v_extMem, __pyx_v_mipmapDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 605, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":604
 *     return ccuda._cuExternalMemoryGetMappedBuffer(devPtr, extMem, bufferDesc)
 * 
 * cdef CUresult cuExternalMemoryGetMappedMipmappedArray(CUmipmappedArray* mipmap, CUexternalMemory extMem, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* mipmapDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuExternalMemoryGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":607
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
 * 
 * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDestroyExternalMemory(extMem)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDestroyExternalMemory(CUexternalMemory __pyx_v_extMem) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDestroyExternalMemory", __pyx_f[0], 607, 1, __PYX_ERR(0, 607, __pyx_L1_error));

  /* "cuda/ccuda.pyx":608
 * 
 * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDestroyExternalMemory(extMem)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalMemory(__pyx_v_extMem); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 608, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":607
 *     return ccuda._cuExternalMemoryGetMappedMipmappedArray(mipmap, extMem, mipmapDesc)
 * 
 * cdef CUresult cuDestroyExternalMemory(CUexternalMemory extMem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDestroyExternalMemory(extMem)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDestroyExternalMemory", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":610
 *     return ccuda._cuDestroyExternalMemory(extMem)
 * 
 * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuImportExternalSemaphore(CUexternalSemaphore *__pyx_v_extSem_out, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *__pyx_v_semHandleDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuImportExternalSemaphore", __pyx_f[0], 610, 1, __PYX_ERR(0, 610, __pyx_L1_error));

  /* "cuda/ccuda.pyx":611
 * 
 * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore(__pyx_v_extSem_out, __pyx_v_semHandleDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 611, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":610
 *     return ccuda._cuDestroyExternalMemory(extMem)
 * 
 * cdef CUresult cuImportExternalSemaphore(CUexternalSemaphore* extSem_out, const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* semHandleDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuImportExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":613
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)
 * 
 * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSignalExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuSignalExternalSemaphoresAsync", __pyx_f[0], 613, 1, __PYX_ERR(0, 613, __pyx_L1_error));

  /* "cuda/ccuda.pyx":614
 * 
 * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSignalExternalSemaphoresAsync(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 614, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":613
 *     return ccuda._cuImportExternalSemaphore(extSem_out, semHandleDesc)
 * 
 * cdef CUresult cuSignalExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuSignalExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":616
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuWaitExternalSemaphoresAsync(CUexternalSemaphore const *__pyx_v_extSemArray, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *__pyx_v_paramsArray, unsigned int __pyx_v_numExtSems, CUstream __pyx_v_stream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuWaitExternalSemaphoresAsync", __pyx_f[0], 616, 1, __PYX_ERR(0, 616, __pyx_L1_error));

  /* "cuda/ccuda.pyx":617
 * 
 * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync(__pyx_v_extSemArray, __pyx_v_paramsArray, __pyx_v_numExtSems, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 617, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":616
 *     return ccuda._cuSignalExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 * cdef CUresult cuWaitExternalSemaphoresAsync(const CUexternalSemaphore* extSemArray, const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray, unsigned int numExtSems, CUstream stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuWaitExternalSemaphoresAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":619
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDestroyExternalSemaphore(extSem)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDestroyExternalSemaphore(CUexternalSemaphore __pyx_v_extSem) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDestroyExternalSemaphore", __pyx_f[0], 619, 1, __PYX_ERR(0, 619, __pyx_L1_error));

  /* "cuda/ccuda.pyx":620
 * 
 * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDestroyExternalSemaphore(extSem)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore(__pyx_v_extSem); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 620, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":619
 *     return ccuda._cuWaitExternalSemaphoresAsync(extSemArray, paramsArray, numExtSems, stream)
 * 
 * cdef CUresult cuDestroyExternalSemaphore(CUexternalSemaphore extSem) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDestroyExternalSemaphore(extSem)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDestroyExternalSemaphore", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":622
 *     return ccuda._cuDestroyExternalSemaphore(extSem)
 * 
 * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue32(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWaitValue32(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWaitValue32", __pyx_f[0], 622, 1, __PYX_ERR(0, 622, __pyx_L1_error));

  /* "cuda/ccuda.pyx":623
 * 
 * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWaitValue32(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 623, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":622
 *     return ccuda._cuDestroyExternalSemaphore(extSem)
 * 
 * cdef CUresult cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue32(stream, addr, value, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWaitValue32", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":625
 *     return ccuda._cuStreamWaitValue32(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue64(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWaitValue64(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWaitValue64", __pyx_f[0], 625, 1, __PYX_ERR(0, 625, __pyx_L1_error));

  /* "cuda/ccuda.pyx":626
 * 
 * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWaitValue64(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 626, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":625
 *     return ccuda._cuStreamWaitValue32(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWaitValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue64(stream, addr, value, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWaitValue64", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":628
 *     return ccuda._cuStreamWaitValue64(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue32(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWriteValue32(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWriteValue32", __pyx_f[0], 628, 1, __PYX_ERR(0, 628, __pyx_L1_error));

  /* "cuda/ccuda.pyx":629
 * 
 * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWriteValue32(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 629, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":628
 *     return ccuda._cuStreamWaitValue64(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue32(stream, addr, value, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWriteValue32", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":631
 *     return ccuda._cuStreamWriteValue32(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue64(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWriteValue64(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWriteValue64", __pyx_f[0], 631, 1, __PYX_ERR(0, 631, __pyx_L1_error));

  /* "cuda/ccuda.pyx":632
 * 
 * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWriteValue64(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 632, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":631
 *     return ccuda._cuStreamWriteValue32(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue64(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue64(stream, addr, value, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWriteValue64", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":634
 *     return ccuda._cuStreamWriteValue64(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBatchMemOp(stream, count, paramArray, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamBatchMemOp(CUstream __pyx_v_stream, unsigned int __pyx_v_count, CUstreamBatchMemOpParams *__pyx_v_paramArray, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamBatchMemOp", __pyx_f[0], 634, 1, __PYX_ERR(0, 634, __pyx_L1_error));

  /* "cuda/ccuda.pyx":635
 * 
 * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamBatchMemOp(stream, count, paramArray, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp(__pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 635, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":634
 *     return ccuda._cuStreamWriteValue64(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBatchMemOp(stream, count, paramArray, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamBatchMemOp", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":637
 *     return ccuda._cuStreamBatchMemOp(stream, count, paramArray, flags)
 * 
 * cdef CUresult cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWaitValue32_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWaitValue32_v2", __pyx_f[0], 637, 1, __PYX_ERR(0, 637, __pyx_L1_error));

  /* "cuda/ccuda.pyx":638
 * 
 * cdef CUresult cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 638, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":637
 *     return ccuda._cuStreamBatchMemOp(stream, count, paramArray, flags)
 * 
 * cdef CUresult cuStreamWaitValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWaitValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":640
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWaitValue64_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWaitValue64_v2", __pyx_f[0], 640, 1, __PYX_ERR(0, 640, __pyx_L1_error));

  /* "cuda/ccuda.pyx":641
 * 
 * cdef CUresult cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 641, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":640
 *     return ccuda._cuStreamWaitValue32_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWaitValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWaitValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":643
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWriteValue32_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint32_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWriteValue32_v2", __pyx_f[0], 643, 1, __PYX_ERR(0, 643, __pyx_L1_error));

  /* "cuda/ccuda.pyx":644
 * 
 * cdef CUresult cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 644, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":643
 *     return ccuda._cuStreamWaitValue64_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue32_v2(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWriteValue32_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":646
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamWriteValue64_v2(CUstream __pyx_v_stream, CUdeviceptr __pyx_v_addr, cuuint64_t __pyx_v_value, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamWriteValue64_v2", __pyx_f[0], 646, 1, __PYX_ERR(0, 646, __pyx_L1_error));

  /* "cuda/ccuda.pyx":647
 * 
 * cdef CUresult cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64_v2(__pyx_v_stream, __pyx_v_addr, __pyx_v_value, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 647, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":646
 *     return ccuda._cuStreamWriteValue32_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamWriteValue64_v2(CUstream stream, CUdeviceptr addr, cuuint64_t value, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamWriteValue64_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":649
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuStreamBatchMemOp_v2(CUstream __pyx_v_stream, unsigned int __pyx_v_count, CUstreamBatchMemOpParams *__pyx_v_paramArray, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuStreamBatchMemOp_v2", __pyx_f[0], 649, 1, __PYX_ERR(0, 649, __pyx_L1_error));

  /* "cuda/ccuda.pyx":650
 * 
 * cdef CUresult cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp_v2(__pyx_v_stream, __pyx_v_count, __pyx_v_paramArray, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 650, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":649
 *     return ccuda._cuStreamWriteValue64_v2(stream, addr, value, flags)
 * 
 * cdef CUresult cuStreamBatchMemOp_v2(CUstream stream, unsigned int count, CUstreamBatchMemOpParams* paramArray, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuStreamBatchMemOp_v2", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":652
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)
 * 
 * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncGetAttribute(int *__pyx_v_pi, CUfunction_attribute __pyx_v_attrib, CUfunction __pyx_v_hfunc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuFuncGetAttribute", __pyx_f[0], 652, 1, __PYX_ERR(0, 652, __pyx_L1_error));

  /* "cuda/ccuda.pyx":653
 * 
 * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute(__pyx_v_pi, __pyx_v_attrib, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 653, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":652
 *     return ccuda._cuStreamBatchMemOp_v2(stream, count, paramArray, flags)
 * 
 * cdef CUresult cuFuncGetAttribute(int* pi, CUfunction_attribute attrib, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuFuncGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":655
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)
 * 
 * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetAttribute(CUfunction __pyx_v_hfunc, CUfunction_attribute __pyx_v_attrib, int __pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuFuncSetAttribute", __pyx_f[0], 655, 1, __PYX_ERR(0, 655, __pyx_L1_error));

  /* "cuda/ccuda.pyx":656
 * 
 * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute(__pyx_v_hfunc, __pyx_v_attrib, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 656, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":655
 *     return ccuda._cuFuncGetAttribute(pi, attrib, hfunc)
 * 
 * cdef CUresult cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib, int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuFuncSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":658
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)
 * 
 * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetCacheConfig(CUfunction __pyx_v_hfunc, CUfunc_cache __pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuFuncSetCacheConfig", __pyx_f[0], 658, 1, __PYX_ERR(0, 658, __pyx_L1_error));

  /* "cuda/ccuda.pyx":659
 * 
 * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig(__pyx_v_hfunc, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 659, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":658
 *     return ccuda._cuFuncSetAttribute(hfunc, attrib, value)
 * 
 * cdef CUresult cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuFuncSetCacheConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":661
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)
 * 
 * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetSharedMemConfig(CUfunction __pyx_v_hfunc, CUsharedconfig __pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuFuncSetSharedMemConfig", __pyx_f[0], 661, 1, __PYX_ERR(0, 661, __pyx_L1_error));

  /* "cuda/ccuda.pyx":662
 * 
 * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig(__pyx_v_hfunc, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 662, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":661
 *     return ccuda._cuFuncSetCacheConfig(hfunc, config)
 * 
 * cdef CUresult cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuFuncSetSharedMemConfig", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":664
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)
 * 
 * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetModule(hmod, hfunc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncGetModule(CUmodule *__pyx_v_hmod, CUfunction __pyx_v_hfunc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuFuncGetModule", __pyx_f[0], 664, 1, __PYX_ERR(0, 664, __pyx_L1_error));

  /* "cuda/ccuda.pyx":665
 * 
 * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuFuncGetModule(hmod, hfunc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule(__pyx_v_hmod, __pyx_v_hfunc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 665, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":664
 *     return ccuda._cuFuncSetSharedMemConfig(hfunc, config)
 * 
 * cdef CUresult cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncGetModule(hmod, hfunc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuFuncGetModule", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":667
 *     return ccuda._cuFuncGetModule(hmod, hfunc)
 * 
 * cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams, void **__pyx_v_extra) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLaunchKernel", __pyx_f[0], 667, 1, __PYX_ERR(0, 667, __pyx_L1_error));

  /* "cuda/ccuda.pyx":668
 * 
 * cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams, __pyx_v_extra); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 668, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":667
 *     return ccuda._cuFuncGetModule(hmod, hfunc)
 * 
 * cdef CUresult cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLaunchKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":670
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 * 
 * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchKernelEx(CUlaunchConfig const *__pyx_v_config, CUfunction __pyx_v_f, void **__pyx_v_kernelParams, void **__pyx_v_extra) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLaunchKernelEx", __pyx_f[0], 670, 1, __PYX_ERR(0, 670, __pyx_L1_error));

  /* "cuda/ccuda.pyx":671
 * 
 * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernelEx(__pyx_v_config, __pyx_v_f, __pyx_v_kernelParams, __pyx_v_extra); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 671, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":670
 *     return ccuda._cuLaunchKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams, extra)
 * 
 * cdef CUresult cuLaunchKernelEx(const CUlaunchConfig* config, CUfunction f, void** kernelParams, void** extra) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLaunchKernelEx", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":673
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)
 * 
 * cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernel(CUfunction __pyx_v_f, unsigned int __pyx_v_gridDimX, unsigned int __pyx_v_gridDimY, unsigned int __pyx_v_gridDimZ, unsigned int __pyx_v_blockDimX, unsigned int __pyx_v_blockDimY, unsigned int __pyx_v_blockDimZ, unsigned int __pyx_v_sharedMemBytes, CUstream __pyx_v_hStream, void **__pyx_v_kernelParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLaunchCooperativeKernel", __pyx_f[0], 673, 1, __PYX_ERR(0, 673, __pyx_L1_error));

  /* "cuda/ccuda.pyx":674
 * 
 * cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel(__pyx_v_f, __pyx_v_gridDimX, __pyx_v_gridDimY, __pyx_v_gridDimZ, __pyx_v_blockDimX, __pyx_v_blockDimY, __pyx_v_blockDimZ, __pyx_v_sharedMemBytes, __pyx_v_hStream, __pyx_v_kernelParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 674, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":673
 *     return ccuda._cuLaunchKernelEx(config, f, kernelParams, extra)
 * 
 * cdef CUresult cuLaunchCooperativeKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void** kernelParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLaunchCooperativeKernel", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":676
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 * 
 * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS *__pyx_v_launchParamsList, unsigned int __pyx_v_numDevices, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLaunchCooperativeKernelMultiDevice", __pyx_f[0], 676, 1, __PYX_ERR(0, 676, __pyx_L1_error));

  /* "cuda/ccuda.pyx":677
 * 
 * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice(__pyx_v_launchParamsList, __pyx_v_numDevices, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":676
 *     return ccuda._cuLaunchCooperativeKernel(f, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, hStream, kernelParams)
 * 
 * cdef CUresult cuLaunchCooperativeKernelMultiDevice(CUDA_LAUNCH_PARAMS* launchParamsList, unsigned int numDevices, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLaunchCooperativeKernelMultiDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":679
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)
 * 
 * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchHostFunc(CUstream __pyx_v_hStream, CUhostFn __pyx_v_fn, void *__pyx_v_userData) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLaunchHostFunc", __pyx_f[0], 679, 1, __PYX_ERR(0, 679, __pyx_L1_error));

  /* "cuda/ccuda.pyx":680
 * 
 * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchHostFunc(__pyx_v_hStream, __pyx_v_fn, __pyx_v_userData); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 680, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":679
 *     return ccuda._cuLaunchCooperativeKernelMultiDevice(launchParamsList, numDevices, flags)
 * 
 * cdef CUresult cuLaunchHostFunc(CUstream hStream, CUhostFn fn, void* userData) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLaunchHostFunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":682
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)
 * 
 * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetBlockShape(CUfunction __pyx_v_hfunc, int __pyx_v_x, int __pyx_v_y, int __pyx_v_z) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuFuncSetBlockShape", __pyx_f[0], 682, 1, __PYX_ERR(0, 682, __pyx_L1_error));

  /* "cuda/ccuda.pyx":683
 * 
 * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape(__pyx_v_hfunc, __pyx_v_x, __pyx_v_y, __pyx_v_z); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 683, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":682
 *     return ccuda._cuLaunchHostFunc(hStream, fn, userData)
 * 
 * cdef CUresult cuFuncSetBlockShape(CUfunction hfunc, int x, int y, int z) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuFuncSetBlockShape", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":685
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)
 * 
 * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuFuncSetSharedSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuFuncSetSharedSize", __pyx_f[0], 685, 1, __PYX_ERR(0, 685, __pyx_L1_error));

  /* "cuda/ccuda.pyx":686
 * 
 * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedSize(__pyx_v_hfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":685
 *     return ccuda._cuFuncSetBlockShape(hfunc, x, y, z)
 * 
 * cdef CUresult cuFuncSetSharedSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuFuncSetSharedSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":688
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)
 * 
 * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetSize(hfunc, numbytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSetSize(CUfunction __pyx_v_hfunc, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuParamSetSize", __pyx_f[0], 688, 1, __PYX_ERR(0, 688, __pyx_L1_error));

  /* "cuda/ccuda.pyx":689
 * 
 * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuParamSetSize(hfunc, numbytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize(__pyx_v_hfunc, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 689, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":688
 *     return ccuda._cuFuncSetSharedSize(hfunc, numbytes)
 * 
 * cdef CUresult cuParamSetSize(CUfunction hfunc, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetSize(hfunc, numbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuParamSetSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":691
 *     return ccuda._cuParamSetSize(hfunc, numbytes)
 * 
 * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSeti(hfunc, offset, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSeti(CUfunction __pyx_v_hfunc, int __pyx_v_offset, unsigned int __pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuParamSeti", __pyx_f[0], 691, 1, __PYX_ERR(0, 691, __pyx_L1_error));

  /* "cuda/ccuda.pyx":692
 * 
 * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuParamSeti(hfunc, offset, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 692, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":691
 *     return ccuda._cuParamSetSize(hfunc, numbytes)
 * 
 * cdef CUresult cuParamSeti(CUfunction hfunc, int offset, unsigned int value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSeti(hfunc, offset, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuParamSeti", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":694
 *     return ccuda._cuParamSeti(hfunc, offset, value)
 * 
 * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetf(hfunc, offset, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSetf(CUfunction __pyx_v_hfunc, int __pyx_v_offset, float __pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuParamSetf", __pyx_f[0], 694, 1, __PYX_ERR(0, 694, __pyx_L1_error));

  /* "cuda/ccuda.pyx":695
 * 
 * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuParamSetf(hfunc, offset, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetf(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 695, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":694
 *     return ccuda._cuParamSeti(hfunc, offset, value)
 * 
 * cdef CUresult cuParamSetf(CUfunction hfunc, int offset, float value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetf(hfunc, offset, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuParamSetf", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":697
 *     return ccuda._cuParamSetf(hfunc, offset, value)
 * 
 * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSetv(CUfunction __pyx_v_hfunc, int __pyx_v_offset, void *__pyx_v_ptr, unsigned int __pyx_v_numbytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuParamSetv", __pyx_f[0], 697, 1, __PYX_ERR(0, 697, __pyx_L1_error));

  /* "cuda/ccuda.pyx":698
 * 
 * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv(__pyx_v_hfunc, __pyx_v_offset, __pyx_v_ptr, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 698, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":697
 *     return ccuda._cuParamSetf(hfunc, offset, value)
 * 
 * cdef CUresult cuParamSetv(CUfunction hfunc, int offset, void* ptr, unsigned int numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuParamSetv", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":700
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)
 * 
 * cdef CUresult cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunch(f)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunch(CUfunction __pyx_v_f) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLaunch", __pyx_f[0], 700, 1, __PYX_ERR(0, 700, __pyx_L1_error));

  /* "cuda/ccuda.pyx":701
 * 
 * cdef CUresult cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLaunch(f)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunch(__pyx_v_f); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 701, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":700
 *     return ccuda._cuParamSetv(hfunc, offset, ptr, numbytes)
 * 
 * cdef CUresult cuLaunch(CUfunction f) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunch(f)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":703
 *     return ccuda._cuLaunch(f)
 * 
 * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchGrid(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLaunchGrid", __pyx_f[0], 703, 1, __PYX_ERR(0, 703, __pyx_L1_error));

  /* "cuda/ccuda.pyx":704
 * 
 * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 704, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":703
 *     return ccuda._cuLaunch(f)
 * 
 * cdef CUresult cuLaunchGrid(CUfunction f, int grid_width, int grid_height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLaunchGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":706
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)
 * 
 * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuLaunchGridAsync(CUfunction __pyx_v_f, int __pyx_v_grid_width, int __pyx_v_grid_height, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuLaunchGridAsync", __pyx_f[0], 706, 1, __PYX_ERR(0, 706, __pyx_L1_error));

  /* "cuda/ccuda.pyx":707
 * 
 * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync(__pyx_v_f, __pyx_v_grid_width, __pyx_v_grid_height, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 707, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":706
 *     return ccuda._cuLaunchGrid(f, grid_width, grid_height)
 * 
 * cdef CUresult cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuLaunchGridAsync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":709
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)
 * 
 * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuParamSetTexRef(CUfunction __pyx_v_hfunc, int __pyx_v_texunit, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuParamSetTexRef", __pyx_f[0], 709, 1, __PYX_ERR(0, 709, __pyx_L1_error));

  /* "cuda/ccuda.pyx":710
 * 
 * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef(__pyx_v_hfunc, __pyx_v_texunit, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 710, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":709
 *     return ccuda._cuLaunchGridAsync(f, grid_width, grid_height, hStream)
 * 
 * cdef CUresult cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuParamSetTexRef", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":712
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)
 * 
 * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphCreate(phGraph, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphCreate(CUgraph *__pyx_v_phGraph, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphCreate", __pyx_f[0], 712, 1, __PYX_ERR(0, 712, __pyx_L1_error));

  /* "cuda/ccuda.pyx":713
 * 
 * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphCreate(phGraph, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate(__pyx_v_phGraph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 713, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":712
 *     return ccuda._cuParamSetTexRef(hfunc, texunit, hTexRef)
 * 
 * cdef CUresult cuGraphCreate(CUgraph* phGraph, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphCreate(phGraph, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":715
 *     return ccuda._cuGraphCreate(phGraph, flags)
 * 
 * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddKernelNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddKernelNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddKernelNode", __pyx_f[0], 715, 1, __PYX_ERR(0, 715, __pyx_L1_error));

  /* "cuda/ccuda.pyx":716
 * 
 * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddKernelNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 716, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":715
 *     return ccuda._cuGraphCreate(phGraph, flags)
 * 
 * cdef CUresult cuGraphAddKernelNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddKernelNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddKernelNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":718
 *     return ccuda._cuGraphAddKernelNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeGetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphKernelNodeGetParams", __pyx_f[0], 718, 1, __PYX_ERR(0, 718, __pyx_L1_error));

  /* "cuda/ccuda.pyx":719
 * 
 * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphKernelNodeGetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 719, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":718
 *     return ccuda._cuGraphAddKernelNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphKernelNodeGetParams(CUgraphNode hNode, CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeGetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":721
 *     return ccuda._cuGraphKernelNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphKernelNodeSetParams", __pyx_f[0], 721, 1, __PYX_ERR(0, 721, __pyx_L1_error));

  /* "cuda/ccuda.pyx":722
 * 
 * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphKernelNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 722, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":721
 *     return ccuda._cuGraphKernelNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphKernelNodeSetParams(CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":724
 *     return ccuda._cuGraphKernelNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddMemcpyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddMemcpyNode", __pyx_f[0], 724, 1, __PYX_ERR(0, 724, __pyx_L1_error));

  /* "cuda/ccuda.pyx":725
 * 
 * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemcpyNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_copyParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 725, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":724
 *     return ccuda._cuGraphKernelNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemcpyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddMemcpyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":727
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 * 
 * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphMemcpyNodeGetParams", __pyx_f[0], 727, 1, __PYX_ERR(0, 727, __pyx_L1_error));

  /* "cuda/ccuda.pyx":728
 * 
 * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 728, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":727
 *     return ccuda._cuGraphAddMemcpyNode(phGraphNode, hGraph, dependencies, numDependencies, copyParams, ctx)
 * 
 * cdef CUresult cuGraphMemcpyNodeGetParams(CUgraphNode hNode, CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphMemcpyNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":730
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphMemcpyNodeSetParams", __pyx_f[0], 730, 1, __PYX_ERR(0, 730, __pyx_L1_error));

  /* "cuda/ccuda.pyx":731
 * 
 * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 731, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":730
 *     return ccuda._cuGraphMemcpyNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphMemcpyNodeSetParams(CUgraphNode hNode, const CUDA_MEMCPY3D* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":733
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddMemsetNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddMemsetNode", __pyx_f[0], 733, 1, __PYX_ERR(0, 733, __pyx_L1_error));

  /* "cuda/ccuda.pyx":734
 * 
 * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_memsetParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 734, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":733
 *     return ccuda._cuGraphMemcpyNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemsetNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddMemsetNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":736
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 * 
 * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemsetNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphMemsetNodeGetParams", __pyx_f[0], 736, 1, __PYX_ERR(0, 736, __pyx_L1_error));

  /* "cuda/ccuda.pyx":737
 * 
 * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 737, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":736
 *     return ccuda._cuGraphAddMemsetNode(phGraphNode, hGraph, dependencies, numDependencies, memsetParams, ctx)
 * 
 * cdef CUresult cuGraphMemsetNodeGetParams(CUgraphNode hNode, CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphMemsetNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":739
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemsetNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphMemsetNodeSetParams", __pyx_f[0], 739, 1, __PYX_ERR(0, 739, __pyx_L1_error));

  /* "cuda/ccuda.pyx":740
 * 
 * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 740, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":739
 *     return ccuda._cuGraphMemsetNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphMemsetNodeSetParams(CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":742
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddHostNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddHostNode", __pyx_f[0], 742, 1, __PYX_ERR(0, 742, __pyx_L1_error));

  /* "cuda/ccuda.pyx":743
 * 
 * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddHostNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 743, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":742
 *     return ccuda._cuGraphMemsetNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddHostNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddHostNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":745
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphHostNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphHostNodeGetParams", __pyx_f[0], 745, 1, __PYX_ERR(0, 745, __pyx_L1_error));

  /* "cuda/ccuda.pyx":746
 * 
 * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 746, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":745
 *     return ccuda._cuGraphAddHostNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphHostNodeGetParams(CUgraphNode hNode, CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphHostNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":748
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphHostNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphHostNodeSetParams", __pyx_f[0], 748, 1, __PYX_ERR(0, 748, __pyx_L1_error));

  /* "cuda/ccuda.pyx":749
 * 
 * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 749, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":748
 *     return ccuda._cuGraphHostNodeGetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphHostNodeSetParams(CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":751
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddChildGraphNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUgraph __pyx_v_childGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddChildGraphNode", __pyx_f[0], 751, 1, __PYX_ERR(0, 751, __pyx_L1_error));

  /* "cuda/ccuda.pyx":752
 * 
 * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddChildGraphNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_childGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 752, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":751
 *     return ccuda._cuGraphHostNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddChildGraphNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddChildGraphNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":754
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 * 
 * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphChildGraphNodeGetGraph(CUgraphNode __pyx_v_hNode, CUgraph *__pyx_v_phGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphChildGraphNodeGetGraph", __pyx_f[0], 754, 1, __PYX_ERR(0, 754, __pyx_L1_error));

  /* "cuda/ccuda.pyx":755
 * 
 * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph(__pyx_v_hNode, __pyx_v_phGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 755, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":754
 *     return ccuda._cuGraphAddChildGraphNode(phGraphNode, hGraph, dependencies, numDependencies, childGraph)
 * 
 * cdef CUresult cuGraphChildGraphNodeGetGraph(CUgraphNode hNode, CUgraph* phGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphChildGraphNodeGetGraph", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":757
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)
 * 
 * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddEmptyNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddEmptyNode", __pyx_f[0], 757, 1, __PYX_ERR(0, 757, __pyx_L1_error));

  /* "cuda/ccuda.pyx":758
 * 
 * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 758, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":757
 *     return ccuda._cuGraphChildGraphNodeGetGraph(hNode, phGraph)
 * 
 * cdef CUresult cuGraphAddEmptyNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddEmptyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":760
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)
 * 
 * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddEventRecordNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddEventRecordNode", __pyx_f[0], 760, 1, __PYX_ERR(0, 760, __pyx_L1_error));

  /* "cuda/ccuda.pyx":761
 * 
 * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventRecordNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 761, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":760
 *     return ccuda._cuGraphAddEmptyNode(phGraphNode, hGraph, dependencies, numDependencies)
 * 
 * cdef CUresult cuGraphAddEventRecordNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddEventRecordNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":763
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphEventRecordNodeGetEvent", __pyx_f[0], 763, 1, __PYX_ERR(0, 763, __pyx_L1_error));

  /* "cuda/ccuda.pyx":764
 * 
 * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent(__pyx_v_hNode, __pyx_v_event_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 764, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":763
 *     return ccuda._cuGraphAddEventRecordNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 * cdef CUresult cuGraphEventRecordNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphEventRecordNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":766
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)
 * 
 * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphEventRecordNodeSetEvent", __pyx_f[0], 766, 1, __PYX_ERR(0, 766, __pyx_L1_error));

  /* "cuda/ccuda.pyx":767
 * 
 * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent(__pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 767, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":766
 *     return ccuda._cuGraphEventRecordNodeGetEvent(hNode, event_out)
 * 
 * cdef CUresult cuGraphEventRecordNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":769
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)
 * 
 * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddEventWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddEventWaitNode", __pyx_f[0], 769, 1, __PYX_ERR(0, 769, __pyx_L1_error));

  /* "cuda/ccuda.pyx":770
 * 
 * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 770, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":769
 *     return ccuda._cuGraphEventRecordNodeSetEvent(hNode, event)
 * 
 * cdef CUresult cuGraphAddEventWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddEventWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":772
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeGetEvent(CUgraphNode __pyx_v_hNode, CUevent *__pyx_v_event_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphEventWaitNodeGetEvent", __pyx_f[0], 772, 1, __PYX_ERR(0, 772, __pyx_L1_error));

  /* "cuda/ccuda.pyx":773
 * 
 * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent(__pyx_v_hNode, __pyx_v_event_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 773, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":772
 *     return ccuda._cuGraphAddEventWaitNode(phGraphNode, hGraph, dependencies, numDependencies, event)
 * 
 * cdef CUresult cuGraphEventWaitNodeGetEvent(CUgraphNode hNode, CUevent* event_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphEventWaitNodeGetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":775
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)
 * 
 * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeSetEvent(CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphEventWaitNodeSetEvent", __pyx_f[0], 775, 1, __PYX_ERR(0, 775, __pyx_L1_error));

  /* "cuda/ccuda.pyx":776
 * 
 * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent(__pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 776, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":775
 *     return ccuda._cuGraphEventWaitNodeGetEvent(hNode, event_out)
 * 
 * cdef CUresult cuGraphEventWaitNodeSetEvent(CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":778
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresSignalNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddExternalSemaphoresSignalNode", __pyx_f[0], 778, 1, __PYX_ERR(0, 778, __pyx_L1_error));

  /* "cuda/ccuda.pyx":779
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 779, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":778
 *     return ccuda._cuGraphEventWaitNodeSetEvent(hNode, event)
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresSignalNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddExternalSemaphoresSignalNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":781
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_f[0], 781, 1, __PYX_ERR(0, 781, __pyx_L1_error));

  /* "cuda/ccuda.pyx":782
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 782, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":781
 *     return ccuda._cuGraphAddExternalSemaphoresSignalNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExternalSemaphoresSignalNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":784
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_f[0], 784, 1, __PYX_ERR(0, 784, __pyx_L1_error));

  /* "cuda/ccuda.pyx":785
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 785, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":784
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphExternalSemaphoresSignalNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":787
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresWaitNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddExternalSemaphoresWaitNode", __pyx_f[0], 787, 1, __PYX_ERR(0, 787, __pyx_L1_error));

  /* "cuda/ccuda.pyx":788
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresWaitNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 788, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":787
 *     return ccuda._cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddExternalSemaphoresWaitNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddExternalSemaphoresWaitNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":790
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_f[0], 790, 1, __PYX_ERR(0, 790, __pyx_L1_error));

  /* "cuda/ccuda.pyx":791
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":790
 *     return ccuda._cuGraphAddExternalSemaphoresWaitNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeGetParams(CUgraphNode hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExternalSemaphoresWaitNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":793
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_f[0], 793, 1, __PYX_ERR(0, 793, __pyx_L1_error));

  /* "cuda/ccuda.pyx":794
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 794, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":793
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphExternalSemaphoresWaitNodeSetParams(CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":796
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddBatchMemOpNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddBatchMemOpNode", __pyx_f[0], 796, 1, __PYX_ERR(0, 796, __pyx_L1_error));

  /* "cuda/ccuda.pyx":797
 * 
 * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddBatchMemOpNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 797, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":796
 *     return ccuda._cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddBatchMemOpNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddBatchMemOpNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":799
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *__pyx_v_nodeParams_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphBatchMemOpNodeGetParams", __pyx_f[0], 799, 1, __PYX_ERR(0, 799, __pyx_L1_error));

  /* "cuda/ccuda.pyx":800
 * 
 * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeGetParams(__pyx_v_hNode, __pyx_v_nodeParams_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 800, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":799
 *     return ccuda._cuGraphAddBatchMemOpNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphBatchMemOpNodeGetParams(CUgraphNode hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphBatchMemOpNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":802
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)
 * 
 * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeSetParams(CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphBatchMemOpNodeSetParams", __pyx_f[0], 802, 1, __PYX_ERR(0, 802, __pyx_L1_error));

  /* "cuda/ccuda.pyx":803
 * 
 * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeSetParams(__pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 803, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":802
 *     return ccuda._cuGraphBatchMemOpNodeGetParams(hNode, nodeParams_out)
 * 
 * cdef CUresult cuGraphBatchMemOpNodeSetParams(CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":805
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecBatchMemOpNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecBatchMemOpNodeSetParams", __pyx_f[0], 805, 1, __PYX_ERR(0, 805, __pyx_L1_error));

  /* "cuda/ccuda.pyx":806
 * 
 * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecBatchMemOpNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 806, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":805
 *     return ccuda._cuGraphBatchMemOpNodeSetParams(hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecBatchMemOpNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_BATCH_MEM_OP_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecBatchMemOpNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":808
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddMemAllocNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddMemAllocNode", __pyx_f[0], 808, 1, __PYX_ERR(0, 808, __pyx_L1_error));

  /* "cuda/ccuda.pyx":809
 * 
 * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 809, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":808
 *     return ccuda._cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphAddMemAllocNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddMemAllocNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":811
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemAllocNodeGetParams(CUgraphNode __pyx_v_hNode, CUDA_MEM_ALLOC_NODE_PARAMS *__pyx_v_params_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphMemAllocNodeGetParams", __pyx_f[0], 811, 1, __PYX_ERR(0, 811, __pyx_L1_error));

  /* "cuda/ccuda.pyx":812
 * 
 * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemAllocNodeGetParams(__pyx_v_hNode, __pyx_v_params_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 812, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":811
 *     return ccuda._cuGraphAddMemAllocNode(phGraphNode, hGraph, dependencies, numDependencies, nodeParams)
 * 
 * cdef CUresult cuGraphMemAllocNodeGetParams(CUgraphNode hNode, CUDA_MEM_ALLOC_NODE_PARAMS* params_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphMemAllocNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":814
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddMemFreeNode(CUgraphNode *__pyx_v_phGraphNode, CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_dependencies, size_t __pyx_v_numDependencies, CUdeviceptr __pyx_v_dptr) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddMemFreeNode", __pyx_f[0], 814, 1, __PYX_ERR(0, 814, __pyx_L1_error));

  /* "cuda/ccuda.pyx":815
 * 
 * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemFreeNode(__pyx_v_phGraphNode, __pyx_v_hGraph, __pyx_v_dependencies, __pyx_v_numDependencies, __pyx_v_dptr); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 815, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":814
 *     return ccuda._cuGraphMemAllocNodeGetParams(hNode, params_out)
 * 
 * cdef CUresult cuGraphAddMemFreeNode(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, size_t numDependencies, CUdeviceptr dptr) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddMemFreeNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":817
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 * 
 * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphMemFreeNodeGetParams(CUgraphNode __pyx_v_hNode, CUdeviceptr *__pyx_v_dptr_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphMemFreeNodeGetParams", __pyx_f[0], 817, 1, __PYX_ERR(0, 817, __pyx_L1_error));

  /* "cuda/ccuda.pyx":818
 * 
 * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams(__pyx_v_hNode, __pyx_v_dptr_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 818, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":817
 *     return ccuda._cuGraphAddMemFreeNode(phGraphNode, hGraph, dependencies, numDependencies, dptr)
 * 
 * cdef CUresult cuGraphMemFreeNodeGetParams(CUgraphNode hNode, CUdeviceptr* dptr_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphMemFreeNodeGetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":820
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)
 * 
 * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGraphMemTrim(device)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGraphMemTrim(CUdevice __pyx_v_device) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGraphMemTrim", __pyx_f[0], 820, 1, __PYX_ERR(0, 820, __pyx_L1_error));

  /* "cuda/ccuda.pyx":821
 * 
 * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGraphMemTrim(device)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim(__pyx_v_device); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 821, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":820
 *     return ccuda._cuGraphMemFreeNodeGetParams(hNode, dptr_out)
 * 
 * cdef CUresult cuDeviceGraphMemTrim(CUdevice device) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGraphMemTrim(device)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGraphMemTrim", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":823
 *     return ccuda._cuDeviceGraphMemTrim(device)
 * 
 * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetGraphMemAttribute", __pyx_f[0], 823, 1, __PYX_ERR(0, 823, __pyx_L1_error));

  /* "cuda/ccuda.pyx":824
 * 
 * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 824, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":823
 *     return ccuda._cuDeviceGraphMemTrim(device)
 * 
 * cdef CUresult cuDeviceGetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":826
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)
 * 
 * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceSetGraphMemAttribute(CUdevice __pyx_v_device, CUgraphMem_attribute __pyx_v_attr, void *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceSetGraphMemAttribute", __pyx_f[0], 826, 1, __PYX_ERR(0, 826, __pyx_L1_error));

  /* "cuda/ccuda.pyx":827
 * 
 * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute(__pyx_v_device, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 827, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":826
 *     return ccuda._cuDeviceGetGraphMemAttribute(device, attr, value)
 * 
 * cdef CUresult cuDeviceSetGraphMemAttribute(CUdevice device, CUgraphMem_attribute attr, void* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceSetGraphMemAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":829
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)
 * 
 * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphClone(CUgraph *__pyx_v_phGraphClone, CUgraph __pyx_v_originalGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphClone", __pyx_f[0], 829, 1, __PYX_ERR(0, 829, __pyx_L1_error));

  /* "cuda/ccuda.pyx":830
 * 
 * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone(__pyx_v_phGraphClone, __pyx_v_originalGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 830, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":829
 *     return ccuda._cuDeviceSetGraphMemAttribute(device, attr, value)
 * 
 * cdef CUresult cuGraphClone(CUgraph* phGraphClone, CUgraph originalGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":832
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)
 * 
 * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeFindInClone(CUgraphNode *__pyx_v_phNode, CUgraphNode __pyx_v_hOriginalNode, CUgraph __pyx_v_hClonedGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphNodeFindInClone", __pyx_f[0], 832, 1, __PYX_ERR(0, 832, __pyx_L1_error));

  /* "cuda/ccuda.pyx":833
 * 
 * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone(__pyx_v_phNode, __pyx_v_hOriginalNode, __pyx_v_hClonedGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 833, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":832
 *     return ccuda._cuGraphClone(phGraphClone, originalGraph)
 * 
 * cdef CUresult cuGraphNodeFindInClone(CUgraphNode* phNode, CUgraphNode hOriginalNode, CUgraph hClonedGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeFindInClone", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":835
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)
 * 
 * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetType(hNode, typename)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetType(CUgraphNode __pyx_v_hNode, CUgraphNodeType *__pyx_v_typename) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphNodeGetType", __pyx_f[0], 835, 1, __PYX_ERR(0, 835, __pyx_L1_error));

  /* "cuda/ccuda.pyx":836
 * 
 * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphNodeGetType(hNode, typename)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType(__pyx_v_hNode, __pyx_v_typename); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 836, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":835
 *     return ccuda._cuGraphNodeFindInClone(phNode, hOriginalNode, hClonedGraph)
 * 
 * cdef CUresult cuGraphNodeGetType(CUgraphNode hNode, CUgraphNodeType* typename) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetType(hNode, typename)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetType", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":838
 *     return ccuda._cuGraphNodeGetType(hNode, typename)
 * 
 * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphGetNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_nodes, size_t *__pyx_v_numNodes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphGetNodes", __pyx_f[0], 838, 1, __PYX_ERR(0, 838, __pyx_L1_error));

  /* "cuda/ccuda.pyx":839
 * 
 * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes(__pyx_v_hGraph, __pyx_v_nodes, __pyx_v_numNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 839, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":838
 *     return ccuda._cuGraphNodeGetType(hNode, typename)
 * 
 * cdef CUresult cuGraphGetNodes(CUgraph hGraph, CUgraphNode* nodes, size_t* numNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphGetNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":841
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)
 * 
 * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphGetRootNodes(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_rootNodes, size_t *__pyx_v_numRootNodes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphGetRootNodes", __pyx_f[0], 841, 1, __PYX_ERR(0, 841, __pyx_L1_error));

  /* "cuda/ccuda.pyx":842
 * 
 * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes(__pyx_v_hGraph, __pyx_v_rootNodes, __pyx_v_numRootNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 842, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":841
 *     return ccuda._cuGraphGetNodes(hGraph, nodes, numNodes)
 * 
 * cdef CUresult cuGraphGetRootNodes(CUgraph hGraph, CUgraphNode* rootNodes, size_t* numRootNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphGetRootNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":844
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)
 * 
 * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphGetEdges(CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_from_, CUgraphNode *__pyx_v_to, size_t *__pyx_v_numEdges) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphGetEdges", __pyx_f[0], 844, 1, __PYX_ERR(0, 844, __pyx_L1_error));

  /* "cuda/ccuda.pyx":845
 * 
 * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numEdges); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 845, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":844
 *     return ccuda._cuGraphGetRootNodes(hGraph, rootNodes, numRootNodes)
 * 
 * cdef CUresult cuGraphGetEdges(CUgraph hGraph, CUgraphNode* from_, CUgraphNode* to, size_t* numEdges) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphGetEdges", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":847
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)
 * 
 * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetDependencies(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependencies, size_t *__pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphNodeGetDependencies", __pyx_f[0], 847, 1, __PYX_ERR(0, 847, __pyx_L1_error));

  /* "cuda/ccuda.pyx":848
 * 
 * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies(__pyx_v_hNode, __pyx_v_dependencies, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 848, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":847
 *     return ccuda._cuGraphGetEdges(hGraph, from_, to, numEdges)
 * 
 * cdef CUresult cuGraphNodeGetDependencies(CUgraphNode hNode, CUgraphNode* dependencies, size_t* numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":850
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetDependentNodes(CUgraphNode __pyx_v_hNode, CUgraphNode *__pyx_v_dependentNodes, size_t *__pyx_v_numDependentNodes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphNodeGetDependentNodes", __pyx_f[0], 850, 1, __PYX_ERR(0, 850, __pyx_L1_error));

  /* "cuda/ccuda.pyx":851
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes(__pyx_v_hNode, __pyx_v_dependentNodes, __pyx_v_numDependentNodes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 851, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":850
 *     return ccuda._cuGraphNodeGetDependencies(hNode, dependencies, numDependencies)
 * 
 * cdef CUresult cuGraphNodeGetDependentNodes(CUgraphNode hNode, CUgraphNode* dependentNodes, size_t* numDependentNodes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetDependentNodes", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":853
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)
 * 
 * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphAddDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphAddDependencies", __pyx_f[0], 853, 1, __PYX_ERR(0, 853, __pyx_L1_error));

  /* "cuda/ccuda.pyx":854
 * 
 * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 854, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":853
 *     return ccuda._cuGraphNodeGetDependentNodes(hNode, dependentNodes, numDependentNodes)
 * 
 * cdef CUresult cuGraphAddDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphAddDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":856
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)
 * 
 * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphRemoveDependencies(CUgraph __pyx_v_hGraph, CUgraphNode const *__pyx_v_from_, CUgraphNode const *__pyx_v_to, size_t __pyx_v_numDependencies) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphRemoveDependencies", __pyx_f[0], 856, 1, __PYX_ERR(0, 856, __pyx_L1_error));

  /* "cuda/ccuda.pyx":857
 * 
 * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies(__pyx_v_hGraph, __pyx_v_from_, __pyx_v_to, __pyx_v_numDependencies); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 857, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":856
 *     return ccuda._cuGraphAddDependencies(hGraph, from_, to, numDependencies)
 * 
 * cdef CUresult cuGraphRemoveDependencies(CUgraph hGraph, const CUgraphNode* from_, const CUgraphNode* to, size_t numDependencies) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphRemoveDependencies", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":859
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)
 * 
 * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDestroyNode(hNode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphDestroyNode(CUgraphNode __pyx_v_hNode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphDestroyNode", __pyx_f[0], 859, 1, __PYX_ERR(0, 859, __pyx_L1_error));

  /* "cuda/ccuda.pyx":860
 * 
 * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphDestroyNode(hNode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroyNode(__pyx_v_hNode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 860, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":859
 *     return ccuda._cuGraphRemoveDependencies(hGraph, from_, to, numDependencies)
 * 
 * cdef CUresult cuGraphDestroyNode(CUgraphNode hNode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDestroyNode(hNode)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphDestroyNode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":862
 *     return ccuda._cuGraphDestroyNode(hNode)
 * 
 * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphInstantiate_v2(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphInstantiate(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_phErrorNode, char *__pyx_v_logBuffer, size_t __pyx_v_bufferSize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphInstantiate", __pyx_f[0], 862, 1, __PYX_ERR(0, 862, __pyx_L1_error));

  /* "cuda/ccuda.pyx":863
 * 
 * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphInstantiate_v2(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiate_v2(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_phErrorNode, __pyx_v_logBuffer, __pyx_v_bufferSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 863, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":862
 *     return ccuda._cuGraphDestroyNode(hNode)
 * 
 * cdef CUresult cuGraphInstantiate(CUgraphExec* phGraphExec, CUgraph hGraph, CUgraphNode* phErrorNode, char* logBuffer, size_t bufferSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphInstantiate_v2(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphInstantiate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":865
 *     return ccuda._cuGraphInstantiate_v2(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 * 
 * cdef CUresult cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphInstantiateWithFlags(CUgraphExec *__pyx_v_phGraphExec, CUgraph __pyx_v_hGraph, unsigned PY_LONG_LONG __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphInstantiateWithFlags", __pyx_f[0], 865, 1, __PYX_ERR(0, 865, __pyx_L1_error));

  /* "cuda/ccuda.pyx":866
 * 
 * cdef CUresult cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithFlags(__pyx_v_phGraphExec, __pyx_v_hGraph, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 866, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":865
 *     return ccuda._cuGraphInstantiate_v2(phGraphExec, hGraph, phErrorNode, logBuffer, bufferSize)
 * 
 * cdef CUresult cuGraphInstantiateWithFlags(CUgraphExec* phGraphExec, CUgraph hGraph, unsigned long long flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphInstantiateWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":868
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)
 * 
 * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecKernelNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_KERNEL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecKernelNodeSetParams", __pyx_f[0], 868, 1, __PYX_ERR(0, 868, __pyx_L1_error));

  /* "cuda/ccuda.pyx":869
 * 
 * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 869, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":868
 *     return ccuda._cuGraphInstantiateWithFlags(phGraphExec, hGraph, flags)
 * 
 * cdef CUresult cuGraphExecKernelNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_KERNEL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecKernelNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":871
 *     return ccuda._cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecMemcpyNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMCPY3D const *__pyx_v_copyParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecMemcpyNodeSetParams", __pyx_f[0], 871, 1, __PYX_ERR(0, 871, __pyx_L1_error));

  /* "cuda/ccuda.pyx":872
 * 
 * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemcpyNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_copyParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 872, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":871
 *     return ccuda._cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecMemcpyNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMCPY3D* copyParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecMemcpyNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":874
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)
 * 
 * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecMemsetNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_MEMSET_NODE_PARAMS const *__pyx_v_memsetParams, CUcontext __pyx_v_ctx) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecMemsetNodeSetParams", __pyx_f[0], 874, 1, __PYX_ERR(0, 874, __pyx_L1_error));

  /* "cuda/ccuda.pyx":875
 * 
 * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_memsetParams, __pyx_v_ctx); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 875, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":874
 *     return ccuda._cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams, ctx)
 * 
 * cdef CUresult cuGraphExecMemsetNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_MEMSET_NODE_PARAMS* memsetParams, CUcontext ctx) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecMemsetNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":877
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)
 * 
 * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecHostNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_HOST_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecHostNodeSetParams", __pyx_f[0], 877, 1, __PYX_ERR(0, 877, __pyx_L1_error));

  /* "cuda/ccuda.pyx":878
 * 
 * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 878, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":877
 *     return ccuda._cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams, ctx)
 * 
 * cdef CUresult cuGraphExecHostNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_HOST_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecHostNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":880
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecChildGraphNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUgraph __pyx_v_childGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecChildGraphNodeSetParams", __pyx_f[0], 880, 1, __PYX_ERR(0, 880, __pyx_L1_error));

  /* "cuda/ccuda.pyx":881
 * 
 * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecChildGraphNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_childGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 881, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":880
 *     return ccuda._cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecChildGraphNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, CUgraph childGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecChildGraphNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":883
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
 * 
 * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecEventRecordNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecEventRecordNodeSetEvent", __pyx_f[0], 883, 1, __PYX_ERR(0, 883, __pyx_L1_error));

  /* "cuda/ccuda.pyx":884
 * 
 * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 884, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":883
 *     return ccuda._cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
 * 
 * cdef CUresult cuGraphExecEventRecordNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecEventRecordNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":886
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
 * 
 * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecEventWaitNodeSetEvent(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUevent __pyx_v_event) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecEventWaitNodeSetEvent", __pyx_f[0], 886, 1, __PYX_ERR(0, 886, __pyx_L1_error));

  /* "cuda/ccuda.pyx":887
 * 
 * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_event); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 887, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":886
 *     return ccuda._cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
 * 
 * cdef CUresult cuGraphExecEventWaitNodeSetEvent(CUgraphExec hGraphExec, CUgraphNode hNode, CUevent event) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecEventWaitNodeSetEvent", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":889
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_f[0], 889, 1, __PYX_ERR(0, 889, __pyx_L1_error));

  /* "cuda/ccuda.pyx":890
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 890, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":889
 *     return ccuda._cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresSignalNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecExternalSemaphoresSignalNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":892
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *__pyx_v_nodeParams) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_f[0], 892, 1, __PYX_ERR(0, 892, __pyx_L1_error));

  /* "cuda/ccuda.pyx":893
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresWaitNodeSetParams(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_nodeParams); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 893, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":892
 *     return ccuda._cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphExecExternalSemaphoresWaitNodeSetParams(CUgraphExec hGraphExec, CUgraphNode hNode, const CUDA_EXT_SEM_WAIT_NODE_PARAMS* nodeParams) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecExternalSemaphoresWaitNodeSetParams", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":895
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeSetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int __pyx_v_isEnabled) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphNodeSetEnabled", __pyx_f[0], 895, 1, __PYX_ERR(0, 895, __pyx_L1_error));

  /* "cuda/ccuda.pyx":896
 * 
 * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 896, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":895
 *     return ccuda._cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams)
 * 
 * cdef CUresult cuGraphNodeSetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeSetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":898
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
 * 
 * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphNodeGetEnabled(CUgraphExec __pyx_v_hGraphExec, CUgraphNode __pyx_v_hNode, unsigned int *__pyx_v_isEnabled) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphNodeGetEnabled", __pyx_f[0], 898, 1, __PYX_ERR(0, 898, __pyx_L1_error));

  /* "cuda/ccuda.pyx":899
 * 
 * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled(__pyx_v_hGraphExec, __pyx_v_hNode, __pyx_v_isEnabled); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 899, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":898
 *     return ccuda._cuGraphNodeSetEnabled(hGraphExec, hNode, isEnabled)
 * 
 * cdef CUresult cuGraphNodeGetEnabled(CUgraphExec hGraphExec, CUgraphNode hNode, unsigned int* isEnabled) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphNodeGetEnabled", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":901
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
 * 
 * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphUpload(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphUpload", __pyx_f[0], 901, 1, __PYX_ERR(0, 901, __pyx_L1_error));

  /* "cuda/ccuda.pyx":902
 * 
 * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload(__pyx_v_hGraphExec, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 902, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":901
 *     return ccuda._cuGraphNodeGetEnabled(hGraphExec, hNode, isEnabled)
 * 
 * cdef CUresult cuGraphUpload(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphUpload", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":904
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)
 * 
 * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphLaunch(CUgraphExec __pyx_v_hGraphExec, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphLaunch", __pyx_f[0], 904, 1, __PYX_ERR(0, 904, __pyx_L1_error));

  /* "cuda/ccuda.pyx":905
 * 
 * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch(__pyx_v_hGraphExec, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 905, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":904
 *     return ccuda._cuGraphUpload(hGraphExec, hStream)
 * 
 * cdef CUresult cuGraphLaunch(CUgraphExec hGraphExec, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphLaunch", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":907
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)
 * 
 * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecDestroy(hGraphExec)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecDestroy(CUgraphExec __pyx_v_hGraphExec) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecDestroy", __pyx_f[0], 907, 1, __PYX_ERR(0, 907, __pyx_L1_error));

  /* "cuda/ccuda.pyx":908
 * 
 * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecDestroy(hGraphExec)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy(__pyx_v_hGraphExec); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 908, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":907
 *     return ccuda._cuGraphLaunch(hGraphExec, hStream)
 * 
 * cdef CUresult cuGraphExecDestroy(CUgraphExec hGraphExec) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecDestroy(hGraphExec)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":910
 *     return ccuda._cuGraphExecDestroy(hGraphExec)
 * 
 * cdef CUresult cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDestroy(hGraph)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphDestroy(CUgraph __pyx_v_hGraph) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphDestroy", __pyx_f[0], 910, 1, __PYX_ERR(0, 910, __pyx_L1_error));

  /* "cuda/ccuda.pyx":911
 * 
 * cdef CUresult cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphDestroy(hGraph)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy(__pyx_v_hGraph); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 911, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":910
 *     return ccuda._cuGraphExecDestroy(hGraphExec)
 * 
 * cdef CUresult cuGraphDestroy(CUgraph hGraph) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDestroy(hGraph)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":913
 *     return ccuda._cuGraphDestroy(hGraph)
 * 
 * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecUpdate(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphExecUpdate(CUgraphExec __pyx_v_hGraphExec, CUgraph __pyx_v_hGraph, CUgraphNode *__pyx_v_hErrorNode_out, CUgraphExecUpdateResult *__pyx_v_updateResult_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphExecUpdate", __pyx_f[0], 913, 1, __PYX_ERR(0, 913, __pyx_L1_error));

  /* "cuda/ccuda.pyx":914
 * 
 * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphExecUpdate(hGraphExec, hGraph, hErrorNode_out, updateResult_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate(__pyx_v_hGraphExec, __pyx_v_hGraph, __pyx_v_hErrorNode_out, __pyx_v_updateResult_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 914, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":913
 *     return ccuda._cuGraphDestroy(hGraph)
 * 
 * cdef CUresult cuGraphExecUpdate(CUgraphExec hGraphExec, CUgraph hGraph, CUgraphNode* hErrorNode_out, CUgraphExecUpdateResult* updateResult_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphExecUpdate(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphExecUpdate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":916
 *     return ccuda._cuGraphExecUpdate(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 * 
 * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeCopyAttributes(CUgraphNode __pyx_v_dst, CUgraphNode __pyx_v_src) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphKernelNodeCopyAttributes", __pyx_f[0], 916, 1, __PYX_ERR(0, 916, __pyx_L1_error));

  /* "cuda/ccuda.pyx":917
 * 
 * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes(__pyx_v_dst, __pyx_v_src); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 917, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":916
 *     return ccuda._cuGraphExecUpdate(hGraphExec, hGraph, hErrorNode_out, updateResult_out)
 * 
 * cdef CUresult cuGraphKernelNodeCopyAttributes(CUgraphNode dst, CUgraphNode src) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeCopyAttributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":919
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)
 * 
 * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue *__pyx_v_value_out) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphKernelNodeGetAttribute", __pyx_f[0], 919, 1, __PYX_ERR(0, 919, __pyx_L1_error));

  /* "cuda/ccuda.pyx":920
 * 
 * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value_out); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 920, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":919
 *     return ccuda._cuGraphKernelNodeCopyAttributes(dst, src)
 * 
 * cdef CUresult cuGraphKernelNodeGetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, CUkernelNodeAttrValue* value_out) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeGetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":922
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)
 * 
 * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetAttribute(CUgraphNode __pyx_v_hNode, CUkernelNodeAttrID __pyx_v_attr, CUkernelNodeAttrValue const *__pyx_v_value) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphKernelNodeSetAttribute", __pyx_f[0], 922, 1, __PYX_ERR(0, 922, __pyx_L1_error));

  /* "cuda/ccuda.pyx":923
 * 
 * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute(__pyx_v_hNode, __pyx_v_attr, __pyx_v_value); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 923, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":922
 *     return ccuda._cuGraphKernelNodeGetAttribute(hNode, attr, value_out)
 * 
 * cdef CUresult cuGraphKernelNodeSetAttribute(CUgraphNode hNode, CUkernelNodeAttrID attr, const CUkernelNodeAttrValue* value) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphKernelNodeSetAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":925
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)
 * 
 * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphDebugDotPrint(CUgraph __pyx_v_hGraph, char const *__pyx_v_path, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphDebugDotPrint", __pyx_f[0], 925, 1, __PYX_ERR(0, 925, __pyx_L1_error));

  /* "cuda/ccuda.pyx":926
 * 
 * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint(__pyx_v_hGraph, __pyx_v_path, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 926, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":925
 *     return ccuda._cuGraphKernelNodeSetAttribute(hNode, attr, value)
 * 
 * cdef CUresult cuGraphDebugDotPrint(CUgraph hGraph, const char* path, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphDebugDotPrint", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":928
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)
 * 
 * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuUserObjectCreate(CUuserObject *__pyx_v_object_out, void *__pyx_v_ptr, CUhostFn __pyx_v_destroy, unsigned int __pyx_v_initialRefcount, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuUserObjectCreate", __pyx_f[0], 928, 1, __PYX_ERR(0, 928, __pyx_L1_error));

  /* "cuda/ccuda.pyx":929
 * 
 * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectCreate(__pyx_v_object_out, __pyx_v_ptr, __pyx_v_destroy, __pyx_v_initialRefcount, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 929, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":928
 *     return ccuda._cuGraphDebugDotPrint(hGraph, path, flags)
 * 
 * cdef CUresult cuUserObjectCreate(CUuserObject* object_out, void* ptr, CUhostFn destroy, unsigned int initialRefcount, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuUserObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":931
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
 * 
 * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectRetain(object, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuUserObjectRetain(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuUserObjectRetain", __pyx_f[0], 931, 1, __PYX_ERR(0, 931, __pyx_L1_error));

  /* "cuda/ccuda.pyx":932
 * 
 * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuUserObjectRetain(object, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRetain(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 932, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":931
 *     return ccuda._cuUserObjectCreate(object_out, ptr, destroy, initialRefcount, flags)
 * 
 * cdef CUresult cuUserObjectRetain(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectRetain(object, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuUserObjectRetain", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":934
 *     return ccuda._cuUserObjectRetain(object, count)
 * 
 * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectRelease(object, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuUserObjectRelease(CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuUserObjectRelease", __pyx_f[0], 934, 1, __PYX_ERR(0, 934, __pyx_L1_error));

  /* "cuda/ccuda.pyx":935
 * 
 * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuUserObjectRelease(object, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease(__pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 935, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":934
 *     return ccuda._cuUserObjectRetain(object, count)
 * 
 * cdef CUresult cuUserObjectRelease(CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuUserObjectRelease(object, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuUserObjectRelease", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":937
 *     return ccuda._cuUserObjectRelease(object, count)
 * 
 * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphRetainUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphRetainUserObject", __pyx_f[0], 937, 1, __PYX_ERR(0, 937, __pyx_L1_error));

  /* "cuda/ccuda.pyx":938
 * 
 * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 938, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":937
 *     return ccuda._cuUserObjectRelease(object, count)
 * 
 * cdef CUresult cuGraphRetainUserObject(CUgraph graph, CUuserObject object, unsigned int count, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphRetainUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":940
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)
 * 
 * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphReleaseUserObject(CUgraph __pyx_v_graph, CUuserObject __pyx_v_object, unsigned int __pyx_v_count) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphReleaseUserObject", __pyx_f[0], 940, 1, __PYX_ERR(0, 940, __pyx_L1_error));

  /* "cuda/ccuda.pyx":941
 * 
 * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphReleaseUserObject(__pyx_v_graph, __pyx_v_object, __pyx_v_count); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 941, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":940
 *     return ccuda._cuGraphRetainUserObject(graph, object, count, flags)
 * 
 * cdef CUresult cuGraphReleaseUserObject(CUgraph graph, CUuserObject object, unsigned int count) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphReleaseUserObject", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":943
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessor(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_f[0], 943, 1, __PYX_ERR(0, 943, __pyx_L1_error));

  /* "cuda/ccuda.pyx":944
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 944, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":943
 *     return ccuda._cuGraphReleaseUserObject(graph, object, count)
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessor", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":946
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int *__pyx_v_numBlocks, CUfunction __pyx_v_func, int __pyx_v_blockSize, size_t __pyx_v_dynamicSMemSize, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_f[0], 946, 1, __PYX_ERR(0, 946, __pyx_L1_error));

  /* "cuda/ccuda.pyx":947
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(__pyx_v_numBlocks, __pyx_v_func, __pyx_v_blockSize, __pyx_v_dynamicSMemSize, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 947, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":946
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessor(numBlocks, func, blockSize, dynamicSMemSize)
 * 
 * cdef CUresult cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, CUfunction func, int blockSize, size_t dynamicSMemSize, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":949
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSize(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuOccupancyMaxPotentialBlockSize", __pyx_f[0], 949, 1, __PYX_ERR(0, 949, __pyx_L1_error));

  /* "cuda/ccuda.pyx":950
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSize(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 950, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":949
 *     return ccuda._cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(numBlocks, func, blockSize, dynamicSMemSize, flags)
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSize(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxPotentialBlockSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":952
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSizeWithFlags(int *__pyx_v_minGridSize, int *__pyx_v_blockSize, CUfunction __pyx_v_func, CUoccupancyB2DSize __pyx_v_blockSizeToDynamicSMemSize, size_t __pyx_v_dynamicSMemSize, int __pyx_v_blockSizeLimit, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_f[0], 952, 1, __PYX_ERR(0, 952, __pyx_L1_error));

  /* "cuda/ccuda.pyx":953
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSizeWithFlags(__pyx_v_minGridSize, __pyx_v_blockSize, __pyx_v_func, __pyx_v_blockSizeToDynamicSMemSize, __pyx_v_dynamicSMemSize, __pyx_v_blockSizeLimit, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 953, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":952
 *     return ccuda._cuOccupancyMaxPotentialBlockSize(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit)
 * 
 * cdef CUresult cuOccupancyMaxPotentialBlockSizeWithFlags(int* minGridSize, int* blockSize, CUfunction func, CUoccupancyB2DSize blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxPotentialBlockSizeWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":955
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 * 
 * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyAvailableDynamicSMemPerBlock(size_t *__pyx_v_dynamicSmemSize, CUfunction __pyx_v_func, int __pyx_v_numBlocks, int __pyx_v_blockSize) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuOccupancyAvailableDynamicSMemPerBlock", __pyx_f[0], 955, 1, __PYX_ERR(0, 955, __pyx_L1_error));

  /* "cuda/ccuda.pyx":956
 * 
 * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyAvailableDynamicSMemPerBlock(__pyx_v_dynamicSmemSize, __pyx_v_func, __pyx_v_numBlocks, __pyx_v_blockSize); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 956, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":955
 *     return ccuda._cuOccupancyMaxPotentialBlockSizeWithFlags(minGridSize, blockSize, func, blockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags)
 * 
 * cdef CUresult cuOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, CUfunction func, int numBlocks, int blockSize) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuOccupancyAvailableDynamicSMemPerBlock", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":958
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
 * 
 * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialClusterSize(int *__pyx_v_clusterSize, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuOccupancyMaxPotentialClusterSize", __pyx_f[0], 958, 1, __PYX_ERR(0, 958, __pyx_L1_error));

  /* "cuda/ccuda.pyx":959
 * 
 * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialClusterSize(__pyx_v_clusterSize, __pyx_v_func, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 959, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":958
 *     return ccuda._cuOccupancyAvailableDynamicSMemPerBlock(dynamicSmemSize, func, numBlocks, blockSize)
 * 
 * cdef CUresult cuOccupancyMaxPotentialClusterSize(int* clusterSize, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxPotentialClusterSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":961
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)
 * 
 * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveClusters(int *__pyx_v_numClusters, CUfunction __pyx_v_func, CUlaunchConfig const *__pyx_v_config) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuOccupancyMaxActiveClusters", __pyx_f[0], 961, 1, __PYX_ERR(0, 961, __pyx_L1_error));

  /* "cuda/ccuda.pyx":962
 * 
 * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveClusters(__pyx_v_numClusters, __pyx_v_func, __pyx_v_config); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 962, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":961
 *     return ccuda._cuOccupancyMaxPotentialClusterSize(clusterSize, func, config)
 * 
 * cdef CUresult cuOccupancyMaxActiveClusters(int* numClusters, CUfunction func, const CUlaunchConfig* config) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuOccupancyMaxActiveClusters", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":964
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)
 * 
 * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetArray(CUtexref __pyx_v_hTexRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetArray", __pyx_f[0], 964, 1, __PYX_ERR(0, 964, __pyx_L1_error));

  /* "cuda/ccuda.pyx":965
 * 
 * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray(__pyx_v_hTexRef, __pyx_v_hArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 965, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":964
 *     return ccuda._cuOccupancyMaxActiveClusters(numClusters, func, config)
 * 
 * cdef CUresult cuTexRefSetArray(CUtexref hTexRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":967
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)
 * 
 * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMipmappedArray(CUtexref __pyx_v_hTexRef, CUmipmappedArray __pyx_v_hMipmappedArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetMipmappedArray", __pyx_f[0], 967, 1, __PYX_ERR(0, 967, __pyx_L1_error));

  /* "cuda/ccuda.pyx":968
 * 
 * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray(__pyx_v_hTexRef, __pyx_v_hMipmappedArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 968, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":967
 *     return ccuda._cuTexRefSetArray(hTexRef, hArray, Flags)
 * 
 * cdef CUresult cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":970
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)
 * 
 * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetAddress(size_t *__pyx_v_ByteOffset, CUtexref __pyx_v_hTexRef, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_numbytes) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetAddress", __pyx_f[0], 970, 1, __PYX_ERR(0, 970, __pyx_L1_error));

  /* "cuda/ccuda.pyx":971
 * 
 * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress_v2(__pyx_v_ByteOffset, __pyx_v_hTexRef, __pyx_v_dptr, __pyx_v_numbytes); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 971, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":970
 *     return ccuda._cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags)
 * 
 * cdef CUresult cuTexRefSetAddress(size_t* ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t numbytes) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":973
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)
 * 
 * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetAddress2D(CUtexref __pyx_v_hTexRef, CUDA_ARRAY_DESCRIPTOR const *__pyx_v_desc, CUdeviceptr __pyx_v_dptr, size_t __pyx_v_Pitch) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetAddress2D", __pyx_f[0], 973, 1, __PYX_ERR(0, 973, __pyx_L1_error));

  /* "cuda/ccuda.pyx":974
 * 
 * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress2D_v3(__pyx_v_hTexRef, __pyx_v_desc, __pyx_v_dptr, __pyx_v_Pitch); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 974, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":973
 *     return ccuda._cuTexRefSetAddress_v2(ByteOffset, hTexRef, dptr, numbytes)
 * 
 * cdef CUresult cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR* desc, CUdeviceptr dptr, size_t Pitch) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetAddress2D", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":976
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)
 * 
 * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetFormat(CUtexref __pyx_v_hTexRef, CUarray_format __pyx_v_fmt, int __pyx_v_NumPackedComponents) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetFormat", __pyx_f[0], 976, 1, __PYX_ERR(0, 976, __pyx_L1_error));

  /* "cuda/ccuda.pyx":977
 * 
 * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat(__pyx_v_hTexRef, __pyx_v_fmt, __pyx_v_NumPackedComponents); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 977, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":976
 *     return ccuda._cuTexRefSetAddress2D_v3(hTexRef, desc, dptr, Pitch)
 * 
 * cdef CUresult cuTexRefSetFormat(CUtexref hTexRef, CUarray_format fmt, int NumPackedComponents) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":979
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)
 * 
 * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetAddressMode(CUtexref __pyx_v_hTexRef, int __pyx_v_dim, CUaddress_mode __pyx_v_am) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetAddressMode", __pyx_f[0], 979, 1, __PYX_ERR(0, 979, __pyx_L1_error));

  /* "cuda/ccuda.pyx":980
 * 
 * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode(__pyx_v_hTexRef, __pyx_v_dim, __pyx_v_am); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 980, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":979
 *     return ccuda._cuTexRefSetFormat(hTexRef, fmt, NumPackedComponents)
 * 
 * cdef CUresult cuTexRefSetAddressMode(CUtexref hTexRef, int dim, CUaddress_mode am) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":982
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)
 * 
 * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetFilterMode", __pyx_f[0], 982, 1, __PYX_ERR(0, 982, __pyx_L1_error));

  /* "cuda/ccuda.pyx":983
 * 
 * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode(__pyx_v_hTexRef, __pyx_v_fm); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 983, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":982
 *     return ccuda._cuTexRefSetAddressMode(hTexRef, dim, am)
 * 
 * cdef CUresult cuTexRefSetFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":985
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)
 * 
 * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapFilterMode(CUtexref __pyx_v_hTexRef, CUfilter_mode __pyx_v_fm) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetMipmapFilterMode", __pyx_f[0], 985, 1, __PYX_ERR(0, 985, __pyx_L1_error));

  /* "cuda/ccuda.pyx":986
 * 
 * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode(__pyx_v_hTexRef, __pyx_v_fm); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 986, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":985
 *     return ccuda._cuTexRefSetFilterMode(hTexRef, fm)
 * 
 * cdef CUresult cuTexRefSetMipmapFilterMode(CUtexref hTexRef, CUfilter_mode fm) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":988
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)
 * 
 * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelBias(CUtexref __pyx_v_hTexRef, float __pyx_v_bias) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetMipmapLevelBias", __pyx_f[0], 988, 1, __PYX_ERR(0, 988, __pyx_L1_error));

  /* "cuda/ccuda.pyx":989
 * 
 * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias(__pyx_v_hTexRef, __pyx_v_bias); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 989, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":988
 *     return ccuda._cuTexRefSetMipmapFilterMode(hTexRef, fm)
 * 
 * cdef CUresult cuTexRefSetMipmapLevelBias(CUtexref hTexRef, float bias) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":991
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)
 * 
 * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelClamp(CUtexref __pyx_v_hTexRef, float __pyx_v_minMipmapLevelClamp, float __pyx_v_maxMipmapLevelClamp) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetMipmapLevelClamp", __pyx_f[0], 991, 1, __PYX_ERR(0, 991, __pyx_L1_error));

  /* "cuda/ccuda.pyx":992
 * 
 * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp(__pyx_v_hTexRef, __pyx_v_minMipmapLevelClamp, __pyx_v_maxMipmapLevelClamp); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 992, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":991
 *     return ccuda._cuTexRefSetMipmapLevelBias(hTexRef, bias)
 * 
 * cdef CUresult cuTexRefSetMipmapLevelClamp(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":994
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 * 
 * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetMaxAnisotropy(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_maxAniso) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetMaxAnisotropy", __pyx_f[0], 994, 1, __PYX_ERR(0, 994, __pyx_L1_error));

  /* "cuda/ccuda.pyx":995
 * 
 * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy(__pyx_v_hTexRef, __pyx_v_maxAniso); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 995, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":994
 *     return ccuda._cuTexRefSetMipmapLevelClamp(hTexRef, minMipmapLevelClamp, maxMipmapLevelClamp)
 * 
 * cdef CUresult cuTexRefSetMaxAnisotropy(CUtexref hTexRef, unsigned int maxAniso) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":997
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)
 * 
 * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetBorderColor(CUtexref __pyx_v_hTexRef, float *__pyx_v_pBorderColor) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetBorderColor", __pyx_f[0], 997, 1, __PYX_ERR(0, 997, __pyx_L1_error));

  /* "cuda/ccuda.pyx":998
 * 
 * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor(__pyx_v_hTexRef, __pyx_v_pBorderColor); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 998, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":997
 *     return ccuda._cuTexRefSetMaxAnisotropy(hTexRef, maxAniso)
 * 
 * cdef CUresult cuTexRefSetBorderColor(CUtexref hTexRef, float* pBorderColor) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1000
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)
 * 
 * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefSetFlags(CUtexref __pyx_v_hTexRef, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefSetFlags", __pyx_f[0], 1000, 1, __PYX_ERR(0, 1000, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1001
 * 
 * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags(__pyx_v_hTexRef, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1001, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1000
 *     return ccuda._cuTexRefSetBorderColor(hTexRef, pBorderColor)
 * 
 * cdef CUresult cuTexRefSetFlags(CUtexref hTexRef, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefSetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1003
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)
 * 
 * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetAddress(CUdeviceptr *__pyx_v_pdptr, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetAddress", __pyx_f[0], 1003, 1, __PYX_ERR(0, 1003, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1004
 * 
 * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddress_v2(__pyx_v_pdptr, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1004, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1003
 *     return ccuda._cuTexRefSetFlags(hTexRef, Flags)
 * 
 * cdef CUresult cuTexRefGetAddress(CUdeviceptr* pdptr, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1006
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)
 * 
 * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetArray(CUarray *__pyx_v_phArray, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetArray", __pyx_f[0], 1006, 1, __PYX_ERR(0, 1006, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1007
 * 
 * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray(__pyx_v_phArray, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1007, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1006
 *     return ccuda._cuTexRefGetAddress_v2(pdptr, hTexRef)
 * 
 * cdef CUresult cuTexRefGetArray(CUarray* phArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1009
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMipmappedArray(CUmipmappedArray *__pyx_v_phMipmappedArray, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetMipmappedArray", __pyx_f[0], 1009, 1, __PYX_ERR(0, 1009, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1010
 * 
 * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray(__pyx_v_phMipmappedArray, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1010, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1009
 *     return ccuda._cuTexRefGetArray(phArray, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmappedArray(CUmipmappedArray* phMipmappedArray, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1012
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)
 * 
 * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetAddressMode(CUaddress_mode *__pyx_v_pam, CUtexref __pyx_v_hTexRef, int __pyx_v_dim) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetAddressMode", __pyx_f[0], 1012, 1, __PYX_ERR(0, 1012, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1013
 * 
 * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode(__pyx_v_pam, __pyx_v_hTexRef, __pyx_v_dim); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1013, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1012
 *     return ccuda._cuTexRefGetMipmappedArray(phMipmappedArray, hTexRef)
 * 
 * cdef CUresult cuTexRefGetAddressMode(CUaddress_mode* pam, CUtexref hTexRef, int dim) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetAddressMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1015
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)
 * 
 * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetFilterMode", __pyx_f[0], 1015, 1, __PYX_ERR(0, 1015, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1016
 * 
 * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode(__pyx_v_pfm, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1016, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1015
 *     return ccuda._cuTexRefGetAddressMode(pam, hTexRef, dim)
 * 
 * cdef CUresult cuTexRefGetFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1018
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)
 * 
 * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetFormat(CUarray_format *__pyx_v_pFormat, int *__pyx_v_pNumChannels, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetFormat", __pyx_f[0], 1018, 1, __PYX_ERR(0, 1018, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1019
 * 
 * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat(__pyx_v_pFormat, __pyx_v_pNumChannels, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1019, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1018
 *     return ccuda._cuTexRefGetFilterMode(pfm, hTexRef)
 * 
 * cdef CUresult cuTexRefGetFormat(CUarray_format* pFormat, int* pNumChannels, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetFormat", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1021
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapFilterMode(CUfilter_mode *__pyx_v_pfm, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetMipmapFilterMode", __pyx_f[0], 1021, 1, __PYX_ERR(0, 1021, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1022
 * 
 * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode(__pyx_v_pfm, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1022, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1021
 *     return ccuda._cuTexRefGetFormat(pFormat, pNumChannels, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapFilterMode(CUfilter_mode* pfm, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMipmapFilterMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1024
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelBias(float *__pyx_v_pbias, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetMipmapLevelBias", __pyx_f[0], 1024, 1, __PYX_ERR(0, 1024, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1025
 * 
 * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias(__pyx_v_pbias, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1025, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1024
 *     return ccuda._cuTexRefGetMipmapFilterMode(pfm, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapLevelBias(float* pbias, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMipmapLevelBias", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1027
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelClamp(float *__pyx_v_pminMipmapLevelClamp, float *__pyx_v_pmaxMipmapLevelClamp, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetMipmapLevelClamp", __pyx_f[0], 1027, 1, __PYX_ERR(0, 1027, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1028
 * 
 * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp(__pyx_v_pminMipmapLevelClamp, __pyx_v_pmaxMipmapLevelClamp, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1028, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1027
 *     return ccuda._cuTexRefGetMipmapLevelBias(pbias, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp, float* pmaxMipmapLevelClamp, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMipmapLevelClamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1030
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetMaxAnisotropy(int *__pyx_v_pmaxAniso, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetMaxAnisotropy", __pyx_f[0], 1030, 1, __PYX_ERR(0, 1030, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1031
 * 
 * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy(__pyx_v_pmaxAniso, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1031, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1030
 *     return ccuda._cuTexRefGetMipmapLevelClamp(pminMipmapLevelClamp, pmaxMipmapLevelClamp, hTexRef)
 * 
 * cdef CUresult cuTexRefGetMaxAnisotropy(int* pmaxAniso, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetMaxAnisotropy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1033
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)
 * 
 * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetBorderColor(float *__pyx_v_pBorderColor, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetBorderColor", __pyx_f[0], 1033, 1, __PYX_ERR(0, 1033, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1034
 * 
 * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor(__pyx_v_pBorderColor, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1034, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1033
 *     return ccuda._cuTexRefGetMaxAnisotropy(pmaxAniso, hTexRef)
 * 
 * cdef CUresult cuTexRefGetBorderColor(float* pBorderColor, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetBorderColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1036
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)
 * 
 * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefGetFlags(unsigned int *__pyx_v_pFlags, CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefGetFlags", __pyx_f[0], 1036, 1, __PYX_ERR(0, 1036, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1037
 * 
 * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags(__pyx_v_pFlags, __pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1037, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1036
 *     return ccuda._cuTexRefGetBorderColor(pBorderColor, hTexRef)
 * 
 * cdef CUresult cuTexRefGetFlags(unsigned int* pFlags, CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefGetFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1039
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)
 * 
 * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefCreate(pTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefCreate(CUtexref *__pyx_v_pTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefCreate", __pyx_f[0], 1039, 1, __PYX_ERR(0, 1039, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1040
 * 
 * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefCreate(pTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate(__pyx_v_pTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1040, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1039
 *     return ccuda._cuTexRefGetFlags(pFlags, hTexRef)
 * 
 * cdef CUresult cuTexRefCreate(CUtexref* pTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefCreate(pTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1042
 *     return ccuda._cuTexRefCreate(pTexRef)
 * 
 * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefDestroy(hTexRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexRefDestroy(CUtexref __pyx_v_hTexRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexRefDestroy", __pyx_f[0], 1042, 1, __PYX_ERR(0, 1042, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1043
 * 
 * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexRefDestroy(hTexRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy(__pyx_v_hTexRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1043, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1042
 *     return ccuda._cuTexRefCreate(pTexRef)
 * 
 * cdef CUresult cuTexRefDestroy(CUtexref hTexRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexRefDestroy(hTexRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexRefDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1045
 *     return ccuda._cuTexRefDestroy(hTexRef)
 * 
 * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfRefSetArray(CUsurfref __pyx_v_hSurfRef, CUarray __pyx_v_hArray, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuSurfRefSetArray", __pyx_f[0], 1045, 1, __PYX_ERR(0, 1045, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1046
 * 
 * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray(__pyx_v_hSurfRef, __pyx_v_hArray, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1046, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1045
 *     return ccuda._cuTexRefDestroy(hTexRef)
 * 
 * cdef CUresult cuSurfRefSetArray(CUsurfref hSurfRef, CUarray hArray, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuSurfRefSetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1048
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)
 * 
 * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfRefGetArray(CUarray *__pyx_v_phArray, CUsurfref __pyx_v_hSurfRef) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuSurfRefGetArray", __pyx_f[0], 1048, 1, __PYX_ERR(0, 1048, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1049
 * 
 * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray(__pyx_v_phArray, __pyx_v_hSurfRef); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1049, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1048
 *     return ccuda._cuSurfRefSetArray(hSurfRef, hArray, Flags)
 * 
 * cdef CUresult cuSurfRefGetArray(CUarray* phArray, CUsurfref hSurfRef) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuSurfRefGetArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1051
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)
 * 
 * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectCreate(CUtexObject *__pyx_v_pTexObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc, CUDA_TEXTURE_DESC const *__pyx_v_pTexDesc, CUDA_RESOURCE_VIEW_DESC const *__pyx_v_pResViewDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexObjectCreate", __pyx_f[0], 1051, 1, __PYX_ERR(0, 1051, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1052
 * 
 * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate(__pyx_v_pTexObject, __pyx_v_pResDesc, __pyx_v_pTexDesc, __pyx_v_pResViewDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1052, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1051
 *     return ccuda._cuSurfRefGetArray(phArray, hSurfRef)
 * 
 * cdef CUresult cuTexObjectCreate(CUtexObject* pTexObject, const CUDA_RESOURCE_DESC* pResDesc, const CUDA_TEXTURE_DESC* pTexDesc, const CUDA_RESOURCE_VIEW_DESC* pResViewDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1054
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 * 
 * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectDestroy(texObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectDestroy(CUtexObject __pyx_v_texObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexObjectDestroy", __pyx_f[0], 1054, 1, __PYX_ERR(0, 1054, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1055
 * 
 * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexObjectDestroy(texObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectDestroy(__pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1055, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1054
 *     return ccuda._cuTexObjectCreate(pTexObject, pResDesc, pTexDesc, pResViewDesc)
 * 
 * cdef CUresult cuTexObjectDestroy(CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectDestroy(texObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1057
 *     return ccuda._cuTexObjectDestroy(texObject)
 * 
 * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexObjectGetResourceDesc", __pyx_f[0], 1057, 1, __PYX_ERR(0, 1057, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1058
 * 
 * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc(__pyx_v_pResDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1058, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1057
 *     return ccuda._cuTexObjectDestroy(texObject)
 * 
 * cdef CUresult cuTexObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1060
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)
 * 
 * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC *__pyx_v_pTexDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexObjectGetTextureDesc", __pyx_f[0], 1060, 1, __PYX_ERR(0, 1060, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1061
 * 
 * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc(__pyx_v_pTexDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1061, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1060
 *     return ccuda._cuTexObjectGetResourceDesc(pResDesc, texObject)
 * 
 * cdef CUresult cuTexObjectGetTextureDesc(CUDA_TEXTURE_DESC* pTexDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexObjectGetTextureDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1063
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)
 * 
 * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC *__pyx_v_pResViewDesc, CUtexObject __pyx_v_texObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuTexObjectGetResourceViewDesc", __pyx_f[0], 1063, 1, __PYX_ERR(0, 1063, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1064
 * 
 * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc(__pyx_v_pResViewDesc, __pyx_v_texObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1064, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1063
 *     return ccuda._cuTexObjectGetTextureDesc(pTexDesc, texObject)
 * 
 * cdef CUresult cuTexObjectGetResourceViewDesc(CUDA_RESOURCE_VIEW_DESC* pResViewDesc, CUtexObject texObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuTexObjectGetResourceViewDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1066
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)
 * 
 * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfObjectCreate(CUsurfObject *__pyx_v_pSurfObject, CUDA_RESOURCE_DESC const *__pyx_v_pResDesc) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuSurfObjectCreate", __pyx_f[0], 1066, 1, __PYX_ERR(0, 1066, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1067
 * 
 * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate(__pyx_v_pSurfObject, __pyx_v_pResDesc); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1067, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1066
 *     return ccuda._cuTexObjectGetResourceViewDesc(pResViewDesc, texObject)
 * 
 * cdef CUresult cuSurfObjectCreate(CUsurfObject* pSurfObject, const CUDA_RESOURCE_DESC* pResDesc) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuSurfObjectCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1069
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)
 * 
 * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectDestroy(surfObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfObjectDestroy(CUsurfObject __pyx_v_surfObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuSurfObjectDestroy", __pyx_f[0], 1069, 1, __PYX_ERR(0, 1069, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1070
 * 
 * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuSurfObjectDestroy(surfObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectDestroy(__pyx_v_surfObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1070, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1069
 *     return ccuda._cuSurfObjectCreate(pSurfObject, pResDesc)
 * 
 * cdef CUresult cuSurfObjectDestroy(CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectDestroy(surfObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuSurfObjectDestroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1072
 *     return ccuda._cuSurfObjectDestroy(surfObject)
 * 
 * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC *__pyx_v_pResDesc, CUsurfObject __pyx_v_surfObject) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuSurfObjectGetResourceDesc", __pyx_f[0], 1072, 1, __PYX_ERR(0, 1072, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1073
 * 
 * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc(__pyx_v_pResDesc, __pyx_v_surfObject); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1073, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1072
 *     return ccuda._cuSurfObjectDestroy(surfObject)
 * 
 * cdef CUresult cuSurfObjectGetResourceDesc(CUDA_RESOURCE_DESC* pResDesc, CUsurfObject surfObject) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuSurfObjectGetResourceDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1075
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)
 * 
 * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceCanAccessPeer(int *__pyx_v_canAccessPeer, CUdevice __pyx_v_dev, CUdevice __pyx_v_peerDev) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceCanAccessPeer", __pyx_f[0], 1075, 1, __PYX_ERR(0, 1075, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1076
 * 
 * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer(__pyx_v_canAccessPeer, __pyx_v_dev, __pyx_v_peerDev); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1076, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1075
 *     return ccuda._cuSurfObjectGetResourceDesc(pResDesc, surfObject)
 * 
 * cdef CUresult cuDeviceCanAccessPeer(int* canAccessPeer, CUdevice dev, CUdevice peerDev) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceCanAccessPeer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1078
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)
 * 
 * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxEnablePeerAccess(CUcontext __pyx_v_peerContext, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxEnablePeerAccess", __pyx_f[0], 1078, 1, __PYX_ERR(0, 1078, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1079
 * 
 * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess(__pyx_v_peerContext, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1079, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1078
 *     return ccuda._cuDeviceCanAccessPeer(canAccessPeer, dev, peerDev)
 * 
 * cdef CUresult cuCtxEnablePeerAccess(CUcontext peerContext, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxEnablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1081
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)
 * 
 * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuCtxDisablePeerAccess(CUcontext __pyx_v_peerContext) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuCtxDisablePeerAccess", __pyx_f[0], 1081, 1, __PYX_ERR(0, 1081, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1082
 * 
 * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess(__pyx_v_peerContext); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1082, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1081
 *     return ccuda._cuCtxEnablePeerAccess(peerContext, Flags)
 * 
 * cdef CUresult cuCtxDisablePeerAccess(CUcontext peerContext) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuCtxDisablePeerAccess", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1084
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)
 * 
 * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuDeviceGetP2PAttribute(int *__pyx_v_value, CUdevice_P2PAttribute __pyx_v_attrib, CUdevice __pyx_v_srcDevice, CUdevice __pyx_v_dstDevice) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuDeviceGetP2PAttribute", __pyx_f[0], 1084, 1, __PYX_ERR(0, 1084, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1085
 * 
 * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute(__pyx_v_value, __pyx_v_attrib, __pyx_v_srcDevice, __pyx_v_dstDevice); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1085, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1084
 *     return ccuda._cuCtxDisablePeerAccess(peerContext)
 * 
 * cdef CUresult cuDeviceGetP2PAttribute(int* value, CUdevice_P2PAttribute attrib, CUdevice srcDevice, CUdevice dstDevice) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuDeviceGetP2PAttribute", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1087
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)
 * 
 * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsUnregisterResource(resource)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsUnregisterResource(CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsUnregisterResource", __pyx_f[0], 1087, 1, __PYX_ERR(0, 1087, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1088
 * 
 * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsUnregisterResource(resource)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource(__pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1088, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1087
 *     return ccuda._cuDeviceGetP2PAttribute(value, attrib, srcDevice, dstDevice)
 * 
 * cdef CUresult cuGraphicsUnregisterResource(CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsUnregisterResource(resource)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsUnregisterResource", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1090
 *     return ccuda._cuGraphicsUnregisterResource(resource)
 * 
 * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsSubResourceGetMappedArray(CUarray *__pyx_v_pArray, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_arrayIndex, unsigned int __pyx_v_mipLevel) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsSubResourceGetMappedArray", __pyx_f[0], 1090, 1, __PYX_ERR(0, 1090, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1091
 * 
 * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray(__pyx_v_pArray, __pyx_v_resource, __pyx_v_arrayIndex, __pyx_v_mipLevel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1091, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1090
 *     return ccuda._cuGraphicsUnregisterResource(resource)
 * 
 * cdef CUresult cuGraphicsSubResourceGetMappedArray(CUarray* pArray, CUgraphicsResource resource, unsigned int arrayIndex, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsSubResourceGetMappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1093
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray *__pyx_v_pMipmappedArray, CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsResourceGetMappedMipmappedArray", __pyx_f[0], 1093, 1, __PYX_ERR(0, 1093, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1094
 * 
 * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedMipmappedArray(__pyx_v_pMipmappedArray, __pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1094, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1093
 *     return ccuda._cuGraphicsSubResourceGetMappedArray(pArray, resource, arrayIndex, mipLevel)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedMipmappedArray(CUmipmappedArray* pMipmappedArray, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsResourceGetMappedMipmappedArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1096
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedPointer(CUdeviceptr *__pyx_v_pDevPtr, size_t *__pyx_v_pSize, CUgraphicsResource __pyx_v_resource) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsResourceGetMappedPointer", __pyx_f[0], 1096, 1, __PYX_ERR(0, 1096, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1097
 * 
 * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2(__pyx_v_pDevPtr, __pyx_v_pSize, __pyx_v_resource); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1097, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1096
 *     return ccuda._cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray, resource)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedPointer(CUdeviceptr* pDevPtr, size_t* pSize, CUgraphicsResource resource) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsResourceGetMappedPointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1099
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)
 * 
 * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsResourceSetMapFlags(CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsResourceSetMapFlags", __pyx_f[0], 1099, 1, __PYX_ERR(0, 1099, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1100
 * 
 * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2(__pyx_v_resource, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1100, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1099
 *     return ccuda._cuGraphicsResourceGetMappedPointer_v2(pDevPtr, pSize, resource)
 * 
 * cdef CUresult cuGraphicsResourceSetMapFlags(CUgraphicsResource resource, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsResourceSetMapFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1102
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)
 * 
 * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsMapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsMapResources", __pyx_f[0], 1102, 1, __PYX_ERR(0, 1102, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1103
 * 
 * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1103, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1102
 *     return ccuda._cuGraphicsResourceSetMapFlags_v2(resource, flags)
 * 
 * cdef CUresult cuGraphicsMapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsMapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1105
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)
 * 
 * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsUnmapResources(unsigned int __pyx_v_count, CUgraphicsResource *__pyx_v_resources, CUstream __pyx_v_hStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsUnmapResources", __pyx_f[0], 1105, 1, __PYX_ERR(0, 1105, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1106
 * 
 * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources(__pyx_v_count, __pyx_v_resources, __pyx_v_hStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1106, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1105
 *     return ccuda._cuGraphicsMapResources(count, resources, hStream)
 * 
 * cdef CUresult cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource* resources, CUstream hStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsUnmapResources", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1108
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)
 * 
 * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetProcAddress(symbol, pfn, cudaVersion, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGetProcAddress(char const *__pyx_v_symbol, void **__pyx_v_pfn, int __pyx_v_cudaVersion, cuuint64_t __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGetProcAddress", __pyx_f[0], 1108, 1, __PYX_ERR(0, 1108, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1109
 * 
 * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGetProcAddress(symbol, pfn, cudaVersion, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress(__pyx_v_symbol, __pyx_v_pfn, __pyx_v_cudaVersion, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1109, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1108
 *     return ccuda._cuGraphicsUnmapResources(count, resources, hStream)
 * 
 * cdef CUresult cuGetProcAddress(const char* symbol, void** pfn, int cudaVersion, cuuint64_t flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetProcAddress(symbol, pfn, cudaVersion, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGetProcAddress", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1111
 *     return ccuda._cuGetProcAddress(symbol, pfn, cudaVersion, flags)
 * 
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGetExportTable(void const **__pyx_v_ppExportTable, CUuuid const *__pyx_v_pExportTableId) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGetExportTable", __pyx_f[0], 1111, 1, __PYX_ERR(0, 1111, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1112
 * 
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable(__pyx_v_ppExportTable, __pyx_v_pExportTableId); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1112, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1111
 *     return ccuda._cuGetProcAddress(symbol, pfn, cudaVersion, flags)
 * 
 * cdef CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGetExportTable", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1114
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)
 * 
 * cdef CUresult cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerInitialize(configFile, outputFile, outputMode)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuProfilerInitialize(char const *__pyx_v_configFile, char const *__pyx_v_outputFile, CUoutput_mode __pyx_v_outputMode) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuProfilerInitialize", __pyx_f[0], 1114, 1, __PYX_ERR(0, 1114, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1115
 * 
 * cdef CUresult cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuProfilerInitialize(configFile, outputFile, outputMode)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerInitialize(__pyx_v_configFile, __pyx_v_outputFile, __pyx_v_outputMode); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1115, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1114
 *     return ccuda._cuGetExportTable(ppExportTable, pExportTableId)
 * 
 * cdef CUresult cuProfilerInitialize(const char* configFile, const char* outputFile, CUoutput_mode outputMode) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerInitialize(configFile, outputFile, outputMode)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuProfilerInitialize", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1117
 *     return ccuda._cuProfilerInitialize(configFile, outputFile, outputMode)
 * 
 * cdef CUresult cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerStart()
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuProfilerStart(void) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuProfilerStart", __pyx_f[0], 1117, 1, __PYX_ERR(0, 1117, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1118
 * 
 * cdef CUresult cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuProfilerStart()             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1118, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1117
 *     return ccuda._cuProfilerInitialize(configFile, outputFile, outputMode)
 * 
 * cdef CUresult cuProfilerStart() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerStart()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuProfilerStart", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1120
 *     return ccuda._cuProfilerStart()
 * 
 * cdef CUresult cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerStop()
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuProfilerStop(void) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuProfilerStop", __pyx_f[0], 1120, 1, __PYX_ERR(0, 1120, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1121
 * 
 * cdef CUresult cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuProfilerStop()             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop(); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1121, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1120
 *     return ccuda._cuProfilerStart()
 * 
 * cdef CUresult cuProfilerStop() nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuProfilerStop()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuProfilerStop", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1123
 *     return ccuda._cuProfilerStop()
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuVDPAUGetDevice(CUdevice *__pyx_v_pDevice, __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuVDPAUGetDevice", __pyx_f[0], 1123, 1, __PYX_ERR(0, 1123, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1124
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice(__pyx_v_pDevice, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1124, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1123
 *     return ccuda._cuProfilerStop()
 * 
 * cdef CUresult cuVDPAUGetDevice(CUdevice* pDevice, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuVDPAUGetDevice", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1126
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)
 * 
 * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuVDPAUCtxCreate(CUcontext *__pyx_v_pCtx, unsigned int __pyx_v_flags, CUdevice __pyx_v_device, __pyx_t_4cuda_5ccuda_VdpDevice __pyx_v_vdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *__pyx_v_vdpGetProcAddress) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuVDPAUCtxCreate", __pyx_f[0], 1126, 1, __PYX_ERR(0, 1126, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1127
 * 
 * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUCtxCreate_v2(__pyx_v_pCtx, __pyx_v_flags, __pyx_v_device, __pyx_v_vdpDevice, __pyx_v_vdpGetProcAddress); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1127, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1126
 *     return ccuda._cuVDPAUGetDevice(pDevice, vdpDevice, vdpGetProcAddress)
 * 
 * cdef CUresult cuVDPAUCtxCreate(CUcontext* pCtx, unsigned int flags, CUdevice device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuVDPAUCtxCreate", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1129
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 * 
 * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_VdpVideoSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsVDPAURegisterVideoSurface", __pyx_f[0], 1129, 1, __PYX_ERR(0, 1129, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1130
 * 
 * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterVideoSurface(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1130, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1129
 *     return ccuda._cuVDPAUCtxCreate_v2(pCtx, flags, device, vdpDevice, vdpGetProcAddress)
 * 
 * cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResource, VdpVideoSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsVDPAURegisterVideoSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1132
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)
 * 
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_VdpOutputSurface __pyx_v_vdpSurface, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsVDPAURegisterOutputSurface", __pyx_f[0], 1132, 1, __PYX_ERR(0, 1132, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1133
 * 
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterOutputSurface(__pyx_v_pCudaResource, __pyx_v_vdpSurface, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1133, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1132
 *     return ccuda._cuGraphicsVDPAURegisterVideoSurface(pCudaResource, vdpSurface, flags)
 * 
 * cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsVDPAURegisterOutputSurface", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1135
 *     return ccuda._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsEGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_EGLImageKHR __pyx_v_image, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsEGLRegisterImage", __pyx_f[0], 1135, 1, __PYX_ERR(0, 1135, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1136
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsEGLRegisterImage(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1136, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1135
 *     return ccuda._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)
 * 
 * cdef CUresult cuGraphicsEGLRegisterImage(CUgraphicsResource* pCudaResource, EGLImageKHR image, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsEGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1138
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)
 * 
 * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamConsumerConnect", __pyx_f[0], 1138, 1, __PYX_ERR(0, 1138, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1139
 * 
 * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnect(__pyx_v_conn, __pyx_v_stream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1139, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1138
 *     return ccuda._cuGraphicsEGLRegisterImage(pCudaResource, image, flags)
 * 
 * cdef CUresult cuEGLStreamConsumerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1141
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)
 * 
 * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnectWithFlags(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamConsumerConnectWithFlags", __pyx_f[0], 1141, 1, __PYX_ERR(0, 1141, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1142
 * 
 * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnectWithFlags(__pyx_v_conn, __pyx_v_stream, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1142, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1141
 *     return ccuda._cuEGLStreamConsumerConnect(conn, stream)
 * 
 * cdef CUresult cuEGLStreamConsumerConnectWithFlags(CUeglStreamConnection* conn, EGLStreamKHR stream, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerConnectWithFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1144
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)
 * 
 * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerDisconnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamConsumerDisconnect", __pyx_f[0], 1144, 1, __PYX_ERR(0, 1144, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1145
 * 
 * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerDisconnect(__pyx_v_conn); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1145, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1144
 *     return ccuda._cuEGLStreamConsumerConnectWithFlags(conn, stream, flags)
 * 
 * cdef CUresult cuEGLStreamConsumerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1147
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)
 * 
 * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerAcquireFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource *__pyx_v_pCudaResource, CUstream *__pyx_v_pStream, unsigned int __pyx_v_timeout) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamConsumerAcquireFrame", __pyx_f[0], 1147, 1, __PYX_ERR(0, 1147, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1148
 * 
 * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerAcquireFrame(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream, __pyx_v_timeout); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1148, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1147
 *     return ccuda._cuEGLStreamConsumerDisconnect(conn)
 * 
 * cdef CUresult cuEGLStreamConsumerAcquireFrame(CUeglStreamConnection* conn, CUgraphicsResource* pCudaResource, CUstream* pStream, unsigned int timeout) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerAcquireFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1150
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
 * 
 * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamConsumerReleaseFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, CUgraphicsResource __pyx_v_pCudaResource, CUstream *__pyx_v_pStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamConsumerReleaseFrame", __pyx_f[0], 1150, 1, __PYX_ERR(0, 1150, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1151
 * 
 * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame(__pyx_v_conn, __pyx_v_pCudaResource, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1151, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1150
 *     return ccuda._cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, timeout)
 * 
 * cdef CUresult cuEGLStreamConsumerReleaseFrame(CUeglStreamConnection* conn, CUgraphicsResource pCudaResource, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamConsumerReleaseFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1153
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
 * 
 * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamProducerConnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_EGLStreamKHR __pyx_v_stream, __pyx_t_4cuda_5ccuda_EGLint __pyx_v_width, __pyx_t_4cuda_5ccuda_EGLint __pyx_v_height) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamProducerConnect", __pyx_f[0], 1153, 1, __PYX_ERR(0, 1153, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1154
 * 
 * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerConnect(__pyx_v_conn, __pyx_v_stream, __pyx_v_width, __pyx_v_height); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1154, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1153
 *     return ccuda._cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
 * 
 * cdef CUresult cuEGLStreamProducerConnect(CUeglStreamConnection* conn, EGLStreamKHR stream, EGLint width, EGLint height) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamProducerConnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1156
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)
 * 
 * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamProducerDisconnect(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamProducerDisconnect", __pyx_f[0], 1156, 1, __PYX_ERR(0, 1156, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1157
 * 
 * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerDisconnect(__pyx_v_conn); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1157, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1156
 *     return ccuda._cuEGLStreamProducerConnect(conn, stream, width, height)
 * 
 * cdef CUresult cuEGLStreamProducerDisconnect(CUeglStreamConnection* conn) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamProducerDisconnect", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1159
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)
 * 
 * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamProducerPresentFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUeglFrame __pyx_v_eglframe, CUstream *__pyx_v_pStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamProducerPresentFrame", __pyx_f[0], 1159, 1, __PYX_ERR(0, 1159, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1160
 * 
 * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerPresentFrame(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1160, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1159
 *     return ccuda._cuEGLStreamProducerDisconnect(conn)
 * 
 * cdef CUresult cuEGLStreamProducerPresentFrame(CUeglStreamConnection* conn, CUeglFrame eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamProducerPresentFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1162
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)
 * 
 * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEGLStreamProducerReturnFrame(__pyx_t_4cuda_5ccuda_CUeglStreamConnection *__pyx_v_conn, __pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_eglframe, CUstream *__pyx_v_pStream) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEGLStreamProducerReturnFrame", __pyx_f[0], 1162, 1, __PYX_ERR(0, 1162, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1163
 * 
 * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame(__pyx_v_conn, __pyx_v_eglframe, __pyx_v_pStream); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1163, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1162
 *     return ccuda._cuEGLStreamProducerPresentFrame(conn, eglframe, pStream)
 * 
 * cdef CUresult cuEGLStreamProducerReturnFrame(CUeglStreamConnection* conn, CUeglFrame* eglframe, CUstream* pStream) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEGLStreamProducerReturnFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1165
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedEglFrame(__pyx_t_4cuda_5ccuda_CUeglFrame *__pyx_v_eglFrame, CUgraphicsResource __pyx_v_resource, unsigned int __pyx_v_index, unsigned int __pyx_v_mipLevel) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsResourceGetMappedEglFrame", __pyx_f[0], 1165, 1, __PYX_ERR(0, 1165, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1166
 * 
 * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame(__pyx_v_eglFrame, __pyx_v_resource, __pyx_v_index, __pyx_v_mipLevel); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1166, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1165
 *     return ccuda._cuEGLStreamProducerReturnFrame(conn, eglframe, pStream)
 * 
 * cdef CUresult cuGraphicsResourceGetMappedEglFrame(CUeglFrame* eglFrame, CUgraphicsResource resource, unsigned int index, unsigned int mipLevel) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsResourceGetMappedEglFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1168
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
 * 
 * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuEventCreateFromEGLSync(CUevent *__pyx_v_phEvent, __pyx_t_4cuda_5ccuda_EGLSyncKHR __pyx_v_eglSync, unsigned int __pyx_v_flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuEventCreateFromEGLSync", __pyx_f[0], 1168, 1, __PYX_ERR(0, 1168, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1169
 * 
 * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuEventCreateFromEGLSync(__pyx_v_phEvent, __pyx_v_eglSync, __pyx_v_flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1169, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1168
 *     return ccuda._cuGraphicsResourceGetMappedEglFrame(eglFrame, resource, index, mipLevel)
 * 
 * cdef CUresult cuEventCreateFromEGLSync(CUevent* phEvent, EGLSyncKHR eglSync, unsigned int flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuEventCreateFromEGLSync", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1171
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterBuffer(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_GLuint __pyx_v_buffer, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsGLRegisterBuffer", __pyx_f[0], 1171, 1, __PYX_ERR(0, 1171, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1172
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterBuffer(__pyx_v_pCudaResource, __pyx_v_buffer, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1172, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1171
 *     return ccuda._cuEventCreateFromEGLSync(phEvent, eglSync, flags)
 * 
 * cdef CUresult cuGraphicsGLRegisterBuffer(CUgraphicsResource* pCudaResource, GLuint buffer, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsGLRegisterBuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1174
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)
 * 
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)
 * 
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterImage(CUgraphicsResource *__pyx_v_pCudaResource, __pyx_t_4cuda_5ccuda_GLuint __pyx_v_image, __pyx_t_4cuda_5ccuda_GLenum __pyx_v_target, unsigned int __pyx_v_Flags) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGraphicsGLRegisterImage", __pyx_f[0], 1174, 1, __PYX_ERR(0, 1174, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1175
 * 
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)             # <<<<<<<<<<<<<<
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterImage(__pyx_v_pCudaResource, __pyx_v_image, __pyx_v_target, __pyx_v_Flags); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1175, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1174
 *     return ccuda._cuGraphicsGLRegisterBuffer(pCudaResource, buffer, Flags)
 * 
 * cdef CUresult cuGraphicsGLRegisterImage(CUgraphicsResource* pCudaResource, GLuint image, GLenum target, unsigned int Flags) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGraphicsGLRegisterImage", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

/* "cuda/ccuda.pyx":1177
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 */

static CUresult __pyx_f_4cuda_5ccuda_cuGLGetDevices(unsigned int *__pyx_v_pCudaDeviceCount, CUdevice *__pyx_v_pCudaDevices, unsigned int __pyx_v_cudaDeviceCount, __pyx_t_4cuda_5ccuda_CUGLDeviceList __pyx_v_deviceList) {
  CUresult __pyx_r;
  __Pyx_TraceDeclarations
  CUresult __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_TraceCall("cuGLGetDevices", __pyx_f[0], 1177, 1, __PYX_ERR(0, 1177, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1178
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:
 *     return ccuda._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __pyx_f_4cuda_5_cuda_5ccuda__cuGLGetDevices_v2(__pyx_v_pCudaDeviceCount, __pyx_v_pCudaDevices, __pyx_v_cudaDeviceCount, __pyx_v_deviceList); if (unlikely(__pyx_t_1 == ((CUresult)CUDA_ERROR_NOT_FOUND) && __Pyx_ErrOccurredWithGIL())) __PYX_ERR(0, 1178, __pyx_L1_error)
  __pyx_r = __pyx_t_1;
  goto __pyx_L0;

  /* "cuda/ccuda.pyx":1177
 *     return ccuda._cuGraphicsGLRegisterImage(pCudaResource, image, target, Flags)
 * 
 * cdef CUresult cuGLGetDevices(unsigned int* pCudaDeviceCount, CUdevice* pCudaDevices, unsigned int cudaDeviceCount, CUGLDeviceList deviceList) nogil except ?CUDA_ERROR_NOT_FOUND:             # <<<<<<<<<<<<<<
 *     return ccuda._cuGLGetDevices_v2(pCudaDeviceCount, pCudaDevices, cudaDeviceCount, deviceList)
 */

  /* function exit code */
  __pyx_L1_error:;
  {
    #ifdef WITH_THREAD
    PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
    #endif
    __Pyx_AddTraceback("cuda.ccuda.cuGLGetDevices", __pyx_clineno, __pyx_lineno, __pyx_filename);
    #ifdef WITH_THREAD
    __Pyx_PyGILState_Release(__pyx_gilstate_save);
    #endif
  }
  __pyx_r = CUDA_ERROR_NOT_FOUND;
  __pyx_L0:;
  __Pyx_TraceReturn(Py_None, 1);
  return __pyx_r;
}

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_ccuda(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_ccuda},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "ccuda",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  return 0;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
  __Pyx_RefNannyFinishContext();
  return 0;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("cuGetErrorString", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGetErrorString, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGetErrorName", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGetErrorName, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuInit", (void (*)(void))__pyx_f_4cuda_5ccuda_cuInit, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDriverGetVersion", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGet", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGet, "CUresult (CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetCount", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetName", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetName, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetUuid", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetUuid, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetUuid_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetUuid_v2, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetLuid", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceTotalMem", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceTotalMem, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetTexture1DLinearMaxWidth", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetTexture1DLinearMaxWidth, "CUresult (size_t *, CUarray_format, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetAttribute, "CUresult (int *, CUdevice_attribute, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetNvSciSyncAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetNvSciSyncAttributes, "CUresult (void *, CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceSetMemPool", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceSetMemPool, "CUresult (CUdevice, CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetMemPool", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetDefaultMemPool", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetDefaultMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFlushGPUDirectRDMAWrites", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFlushGPUDirectRDMAWrites, "CUresult (CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetProperties", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetProperties, "CUresult (CUdevprop *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceComputeCapability", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceComputeCapability, "CUresult (int *, int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxRetain", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxRelease", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxRelease, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxSetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxSetFlags, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxGetState", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDevicePrimaryCtxReset", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDevicePrimaryCtxReset, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetExecAffinitySupport", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxCreate, "CUresult (CUcontext *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxCreate_v3", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxCreate_v3, "CUresult (CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxDestroy, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxPushCurrent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxPushCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxPopCurrent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxPopCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetCurrent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetCurrent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetDevice", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetFlags, "CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSynchronize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetLimit", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetLimit, "CUresult (CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetLimit", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetLimit, "CUresult (size_t *, CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetCacheConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetCacheConfig, "CUresult (CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetCacheConfig, "CUresult (CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetApiVersion", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetApiVersion, "CUresult (CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetStreamPriorityRange", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetStreamPriorityRange, "CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxResetPersistingL2Cache", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxGetExecAffinity", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxGetExecAffinity, "CUresult (CUexecAffinityParam *, CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxAttach", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxAttach, "CUresult (CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxDetach", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleLoad", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleLoad, "CUresult (CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleLoadData", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleLoadData, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleLoadDataEx", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleLoadDataEx, "CUresult (CUmodule *, void const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleLoadFatBinary", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleLoadFatBinary, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleUnload", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetLoadingMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetFunction", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetGlobal", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetGlobal, "CUresult (CUdeviceptr *, size_t *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetTexRef", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetTexRef, "CUresult (CUtexref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuModuleGetSurfRef", (void (*)(void))__pyx_f_4cuda_5ccuda_cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkCreate, "CUresult (unsigned int, CUjit_option *, void **, CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkAddData", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkAddData, "CUresult (CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkAddFile", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkAddFile, "CUresult (CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkComplete", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkComplete, "CUresult (CUlinkState, void **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLinkDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetInfo", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetInfo, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAlloc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAlloc, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocPitch", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocPitch, "CUresult (CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemFree", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemFree, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetAddressRange", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetAddressRange, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocHost", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocHost, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemFreeHost", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostAlloc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostGetDevicePointer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostGetDevicePointer, "CUresult (CUdeviceptr *, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostGetFlags, "CUresult (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocManaged", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocManaged, "CUresult (CUdeviceptr *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetByPCIBusId", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetByPCIBusId, "CUresult (CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetPCIBusId", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetPCIBusId, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcGetEventHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcGetEventHandle, "CUresult (CUipcEventHandle *, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcOpenEventHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcOpenEventHandle, "CUresult (CUevent *, CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcGetMemHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcOpenMemHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcOpenMemHandle, "CUresult (CUdeviceptr *, CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuIpcCloseMemHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostRegister", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostRegister, "CUresult (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemHostUnregister", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyPeer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyHtoD", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyHtoD, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoH", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoH, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoD", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoD, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoA", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoA, "CUresult (CUarray, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAtoD", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAtoD, "CUresult (CUdeviceptr, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyHtoA", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyHtoA, "CUresult (CUarray, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAtoH", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAtoH, "CUresult (void *, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAtoA", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAtoA, "CUresult (CUarray, size_t, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy2D", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy2D, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy2DUnaligned", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy2DUnaligned, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy3D", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy3D, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy3DPeer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy3DPeer, "CUresult (CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyPeerAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyPeerAsync, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyHtoDAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyHtoDAsync, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoHAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoHAsync, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyDtoDAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyDtoDAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyHtoAAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyHtoAAsync, "CUresult (CUarray, size_t, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpyAtoHAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpyAtoHAsync, "CUresult (void *, CUarray, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy2DAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy2DAsync, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy3DAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy3DAsync, "CUresult (CUDA_MEMCPY3D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemcpy3DPeerAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD8", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD8, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD16", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD16, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD32", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD32, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D8", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D8, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D16", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D16, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D32", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D32, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD8Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD8Async, "CUresult (CUdeviceptr, unsigned char, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD16Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD16Async, "CUresult (CUdeviceptr, unsigned short, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD32Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD32Async, "CUresult (CUdeviceptr, unsigned int, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D8Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D8Async, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D16Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D16Async, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemsetD2D32Async", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemsetD2D32Async, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayCreate, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayGetDescriptor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayGetDescriptor, "CUresult (CUDA_ARRAY_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayGetSparseProperties", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayGetMemoryRequirements", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayGetPlane", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayGetPlane, "CUresult (CUarray *, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArrayDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArray3DCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArray3DCreate, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuArray3DGetDescriptor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuArray3DGetDescriptor, "CUresult (CUDA_ARRAY3D_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayCreate, "CUresult (CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayGetLevel", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayGetLevel, "CUresult (CUarray *, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMipmappedArrayDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetHandleForAddressRange", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetHandleForAddressRange, "CUresult (void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAddressReserve", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAddressReserve, "CUresult (CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAddressFree", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAddressFree, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemCreate, "CUresult (CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemRelease", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemMap", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemMap, "CUresult (CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemMapArrayAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemMapArrayAsync, "CUresult (CUarrayMapInfo *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemUnmap", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemUnmap, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemSetAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemSetAccess, "CUresult (CUdeviceptr, size_t, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetAccess, "CUresult (unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemExportToShareableHandle, "CUresult (void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemImportFromShareableHandle, "CUresult (CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetAllocationGranularity", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetAllocationGranularity, "CUresult (size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemGetAllocationPropertiesFromHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemGetAllocationPropertiesFromHandle, "CUresult (CUmemAllocationProp *, CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemRetainAllocationHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemRetainAllocationHandle, "CUresult (CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemFreeAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemFreeAsync, "CUresult (CUdeviceptr, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocAsync, "CUresult (CUdeviceptr *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolTrimTo", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolTrimTo, "CUresult (CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolSetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolGetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolSetAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolSetAccess, "CUresult (CUmemoryPool, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolGetAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolGetAccess, "CUresult (CUmemAccess_flags *, CUmemoryPool, CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolCreate, "CUresult (CUmemoryPool *, CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAllocFromPoolAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAllocFromPoolAsync, "CUresult (CUdeviceptr *, size_t, CUmemoryPool, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolExportToShareableHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolExportToShareableHandle, "CUresult (void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolImportFromShareableHandle", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolImportFromShareableHandle, "CUresult (CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolExportPointer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolExportPointer, "CUresult (CUmemPoolPtrExportData *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPoolImportPointer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPoolImportPointer, "CUresult (CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuPointerGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuPointerGetAttribute, "CUresult (void *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemPrefetchAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemPrefetchAsync, "CUresult (CUdeviceptr, size_t, CUdevice, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemAdvise", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemAdvise, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemRangeGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemRangeGetAttribute, "CUresult (void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuMemRangeGetAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuMemRangeGetAttributes, "CUresult (void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuPointerSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuPointerSetAttribute, "CUresult (void const *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuPointerGetAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuPointerGetAttributes, "CUresult (unsigned int, CUpointer_attribute *, void **, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamCreate, "CUresult (CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamCreateWithPriority", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamCreateWithPriority, "CUresult (CUstream *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetPriority", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetPriority, "CUresult (CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetFlags, "CUresult (CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetCtx", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetCtx, "CUresult (CUstream, CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWaitEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWaitEvent, "CUresult (CUstream, CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamAddCallback", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamBeginCapture", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamBeginCapture, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuThreadExchangeStreamCaptureMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamEndCapture", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamEndCapture, "CUresult (CUstream, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamIsCapturing", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamIsCapturing, "CUresult (CUstream, CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetCaptureInfo", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetCaptureInfo_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetCaptureInfo_v2, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamUpdateCaptureDependencies", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamUpdateCaptureDependencies, "CUresult (CUstream, CUgraphNode *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamAttachMemAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamAttachMemAsync, "CUresult (CUstream, CUdeviceptr, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamQuery", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamSynchronize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamDestroy, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamCopyAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamCopyAttributes, "CUresult (CUstream, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamGetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamSetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventCreate, "CUresult (CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventRecord", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventRecord, "CUresult (CUevent, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventRecordWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventRecordWithFlags, "CUresult (CUevent, CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventQuery", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventSynchronize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventDestroy, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventElapsedTime", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventElapsedTime, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuImportExternalMemory", (void (*)(void))__pyx_f_4cuda_5ccuda_cuImportExternalMemory, "CUresult (CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuExternalMemoryGetMappedBuffer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedBuffer, "CUresult (CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuExternalMemoryGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuExternalMemoryGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDestroyExternalMemory", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuImportExternalSemaphore", (void (*)(void))__pyx_f_4cuda_5ccuda_cuImportExternalSemaphore, "CUresult (CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSignalExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSignalExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuWaitExternalSemaphoresAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuWaitExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDestroyExternalSemaphore", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWaitValue32", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWaitValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWaitValue64", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWaitValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWriteValue32", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWriteValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWriteValue64", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWriteValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamBatchMemOp", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamBatchMemOp, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWaitValue32_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWaitValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWaitValue64_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWaitValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWriteValue32_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWriteValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamWriteValue64_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamWriteValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuStreamBatchMemOp_v2", (void (*)(void))__pyx_f_4cuda_5ccuda_cuStreamBatchMemOp_v2, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncGetAttribute, "CUresult (int *, CUfunction_attribute, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetAttribute, "CUresult (CUfunction, CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetCacheConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetCacheConfig, "CUresult (CUfunction, CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetSharedMemConfig", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetSharedMemConfig, "CUresult (CUfunction, CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncGetModule", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncGetModule, "CUresult (CUmodule *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchKernel", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchKernelEx", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchKernelEx, "CUresult (CUlaunchConfig const *, CUfunction, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchCooperativeKernel", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchCooperativeKernelMultiDevice", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchCooperativeKernelMultiDevice, "CUresult (CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchHostFunc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchHostFunc, "CUresult (CUstream, CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetBlockShape", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetBlockShape, "CUresult (CUfunction, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuFuncSetSharedSize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuFuncSetSharedSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSetSize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSetSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSeti", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSeti, "CUresult (CUfunction, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSetf", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSetf, "CUresult (CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSetv", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSetv, "CUresult (CUfunction, int, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunch", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchGrid", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchGrid, "CUresult (CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuLaunchGridAsync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuLaunchGridAsync, "CUresult (CUfunction, int, int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuParamSetTexRef", (void (*)(void))__pyx_f_4cuda_5ccuda_cuParamSetTexRef, "CUresult (CUfunction, int, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphCreate, "CUresult (CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddKernelNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddKernelNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddMemcpyNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddMemcpyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemcpyNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemcpyNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddMemsetNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddMemsetNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemsetNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemsetNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemsetNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddHostNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddHostNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphHostNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphHostNodeGetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphHostNodeSetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddChildGraphNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddChildGraphNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphChildGraphNodeGetGraph", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphChildGraphNodeGetGraph, "CUresult (CUgraphNode, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddEmptyNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddEmptyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddEventRecordNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddEventRecordNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphEventRecordNodeGetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphEventRecordNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddEventWaitNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddEventWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphEventWaitNodeGetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphEventWaitNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddExternalSemaphoresSignalNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresSignalNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExternalSemaphoresSignalNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddExternalSemaphoresWaitNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddExternalSemaphoresWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExternalSemaphoresWaitNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddBatchMemOpNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddBatchMemOpNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphBatchMemOpNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeGetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphBatchMemOpNodeSetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecBatchMemOpNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecBatchMemOpNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddMemAllocNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddMemAllocNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemAllocNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemAllocNodeGetParams, "CUresult (CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddMemFreeNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddMemFreeNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphMemFreeNodeGetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphMemFreeNodeGetParams, "CUresult (CUgraphNode, CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGraphMemTrim", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceSetGraphMemAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceSetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphClone", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphClone, "CUresult (CUgraph *, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeFindInClone", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeFindInClone, "CUresult (CUgraphNode *, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetType", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetType, "CUresult (CUgraphNode, CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphGetNodes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphGetNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphGetRootNodes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphGetRootNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphGetEdges", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphGetEdges, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetDependencies", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetDependencies, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetDependentNodes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetDependentNodes, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphAddDependencies", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphAddDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphRemoveDependencies", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphRemoveDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphDestroyNode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphInstantiate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphInstantiate, "CUresult (CUgraphExec *, CUgraph, CUgraphNode *, char *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphInstantiateWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphInstantiateWithFlags, "CUresult (CUgraphExec *, CUgraph, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecKernelNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecKernelNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecMemcpyNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecMemcpyNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecMemsetNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecMemsetNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecHostNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecHostNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecChildGraphNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecChildGraphNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecEventRecordNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecEventRecordNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecEventWaitNodeSetEvent", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecEventWaitNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecExternalSemaphoresWaitNodeSetParams", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeSetEnabled", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeSetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphNodeGetEnabled", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphNodeGetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphUpload", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphUpload, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphLaunch", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphLaunch, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphExecUpdate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphExecUpdate, "CUresult (CUgraphExec, CUgraph, CUgraphNode *, CUgraphExecUpdateResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeCopyAttributes", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeCopyAttributes, "CUresult (CUgraphNode, CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeGetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeGetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphKernelNodeSetAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphKernelNodeSetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphDebugDotPrint", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphDebugDotPrint, "CUresult (CUgraph, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuUserObjectCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuUserObjectCreate, "CUresult (CUuserObject *, void *, CUhostFn, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuUserObjectRetain", (void (*)(void))__pyx_f_4cuda_5ccuda_cuUserObjectRetain, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuUserObjectRelease", (void (*)(void))__pyx_f_4cuda_5ccuda_cuUserObjectRelease, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphRetainUserObject", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphRetainUserObject, "CUresult (CUgraph, CUuserObject, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphReleaseUserObject", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphReleaseUserObject, "CUresult (CUgraph, CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessor, "CUresult (int *, CUfunction, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "CUresult (int *, CUfunction, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxPotentialBlockSize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSize, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxPotentialBlockSizeWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialBlockSizeWithFlags, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyAvailableDynamicSMemPerBlock", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyAvailableDynamicSMemPerBlock, "CUresult (size_t *, CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxPotentialClusterSize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxPotentialClusterSize, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuOccupancyMaxActiveClusters", (void (*)(void))__pyx_f_4cuda_5ccuda_cuOccupancyMaxActiveClusters, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetArray, "CUresult (CUtexref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMipmappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetAddress", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetAddress, "CUresult (size_t *, CUtexref, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetAddress2D", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetAddress2D, "CUresult (CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetFormat", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetFormat, "CUresult (CUtexref, CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetAddressMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetAddressMode, "CUresult (CUtexref, int, CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetFilterMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelBias, "CUresult (CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMipmapLevelClamp, "CUresult (CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetMaxAnisotropy, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetBorderColor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetBorderColor, "CUresult (CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefSetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetAddress", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetAddress, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetArray, "CUresult (CUarray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMipmappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMipmappedArray, "CUresult (CUmipmappedArray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetAddressMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetAddressMode, "CUresult (CUaddress_mode *, CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetFilterMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetFormat", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetFormat, "CUresult (CUarray_format *, int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMipmapFilterMode", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMipmapLevelBias", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelBias, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMipmapLevelClamp", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMipmapLevelClamp, "CUresult (float *, float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetMaxAnisotropy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetMaxAnisotropy, "CUresult (int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetBorderColor", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetBorderColor, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefGetFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefGetFlags, "CUresult (unsigned int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexRefDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfRefSetArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfRefSetArray, "CUresult (CUsurfref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfRefGetArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfRefGetArray, "CUresult (CUarray *, CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectCreate, "CUresult (CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectGetTextureDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectGetTextureDesc, "CUresult (CUDA_TEXTURE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuTexObjectGetResourceViewDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuTexObjectGetResourceViewDesc, "CUresult (CUDA_RESOURCE_VIEW_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfObjectCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfObjectCreate, "CUresult (CUsurfObject *, CUDA_RESOURCE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfObjectDestroy", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuSurfObjectGetResourceDesc", (void (*)(void))__pyx_f_4cuda_5ccuda_cuSurfObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceCanAccessPeer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceCanAccessPeer, "CUresult (int *, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxEnablePeerAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxEnablePeerAccess, "CUresult (CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuCtxDisablePeerAccess", (void (*)(void))__pyx_f_4cuda_5ccuda_cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuDeviceGetP2PAttribute", (void (*)(void))__pyx_f_4cuda_5ccuda_cuDeviceGetP2PAttribute, "CUresult (int *, CUdevice_P2PAttribute, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsUnregisterResource", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsSubResourceGetMappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsSubResourceGetMappedArray, "CUresult (CUarray *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedMipmappedArray", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedPointer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedPointer, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsResourceSetMapFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsResourceSetMapFlags, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsMapResources", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsMapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsUnmapResources", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsUnmapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGetProcAddress", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGetProcAddress, "CUresult (char const *, void **, int, cuuint64_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGetExportTable", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGetExportTable, "CUresult (void const **, CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuProfilerInitialize", (void (*)(void))__pyx_f_4cuda_5ccuda_cuProfilerInitialize, "CUresult (char const *, char const *, CUoutput_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuProfilerStart", (void (*)(void))__pyx_f_4cuda_5ccuda_cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuProfilerStop", (void (*)(void))__pyx_f_4cuda_5ccuda_cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuVDPAUGetDevice", (void (*)(void))__pyx_f_4cuda_5ccuda_cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuVDPAUCtxCreate", (void (*)(void))__pyx_f_4cuda_5ccuda_cuVDPAUCtxCreate, "CUresult (CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsVDPAURegisterVideoSurface", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsVDPAURegisterOutputSurface", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsEGLRegisterImage", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerConnect", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerConnectWithFlags", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerDisconnect", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerAcquireFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamConsumerReleaseFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamProducerConnect", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, __pyx_t_4cuda_5ccuda_EGLint, __pyx_t_4cuda_5ccuda_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamProducerDisconnect", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamProducerPresentFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEGLStreamProducerReturnFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsResourceGetMappedEglFrame", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuEventCreateFromEGLSync", (void (*)(void))__pyx_f_4cuda_5ccuda_cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_5ccuda_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsGLRegisterBuffer", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGraphicsGLRegisterImage", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, __pyx_t_4cuda_5ccuda_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ExportFunction("cuGLGetDevices", (void (*)(void))__pyx_f_4cuda_5ccuda_cuGLGetDevices, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_5ccuda_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __pyx_t_1 = PyImport_ImportModule("cuda._cuda.ccuda"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGetErrorString", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorString, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGetErrorName", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGetErrorName, "CUresult (CUresult, char const **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuInit", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuInit, "CUresult (unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDriverGetVersion", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDriverGetVersion, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGet", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGet, "CUresult (CUdevice *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetCount", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetCount, "CUresult (int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetName", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetName, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetUuid", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetUuid_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetUuid_v2, "CUresult (CUuuid *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetLuid", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetLuid, "CUresult (char *, unsigned int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceTotalMem_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceTotalMem_v2, "CUresult (size_t *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetTexture1DLinearMaxWidth", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetTexture1DLinearMaxWidth, "CUresult (size_t *, CUarray_format, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetAttribute, "CUresult (int *, CUdevice_attribute, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetNvSciSyncAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetNvSciSyncAttributes, "CUresult (void *, CUdevice, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceSetMemPool", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetMemPool, "CUresult (CUdevice, CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetMemPool", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetDefaultMemPool", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetDefaultMemPool, "CUresult (CUmemoryPool *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuFlushGPUDirectRDMAWrites", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFlushGPUDirectRDMAWrites, "CUresult (CUflushGPUDirectRDMAWritesTarget, CUflushGPUDirectRDMAWritesScope)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetProperties", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetProperties, "CUresult (CUdevprop *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceComputeCapability", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceComputeCapability, "CUresult (int *, int *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDevicePrimaryCtxRetain", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRetain, "CUresult (CUcontext *, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDevicePrimaryCtxRelease_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxRelease_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDevicePrimaryCtxSetFlags_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxSetFlags_v2, "CUresult (CUdevice, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDevicePrimaryCtxGetState", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxGetState, "CUresult (CUdevice, unsigned int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDevicePrimaryCtxReset_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDevicePrimaryCtxReset_v2, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetExecAffinitySupport", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetExecAffinitySupport, "CUresult (int *, CUexecAffinityType, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxCreate_v3", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxCreate_v3, "CUresult (CUcontext *, CUexecAffinityParam *, int, unsigned int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxDestroy_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDestroy_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxPushCurrent_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPushCurrent_v2, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxPopCurrent_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxPopCurrent_v2, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxSetCurrent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCurrent, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetCurrent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCurrent, "CUresult (CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetDevice", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetDevice, "CUresult (CUdevice *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetFlags, "CUresult (unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxSynchronize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSynchronize, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxSetLimit", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetLimit, "CUresult (CUlimit, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetLimit", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetLimit, "CUresult (size_t *, CUlimit)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetCacheConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetCacheConfig, "CUresult (CUfunc_cache *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetCacheConfig, "CUresult (CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetSharedMemConfig, "CUresult (CUsharedconfig *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxSetSharedMemConfig, "CUresult (CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetApiVersion", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetApiVersion, "CUresult (CUcontext, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetStreamPriorityRange", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetStreamPriorityRange, "CUresult (int *, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxResetPersistingL2Cache", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxResetPersistingL2Cache, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxGetExecAffinity", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxGetExecAffinity, "CUresult (CUexecAffinityParam *, CUexecAffinityType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxAttach", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxAttach, "CUresult (CUcontext *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxDetach", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDetach, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleLoad", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoad, "CUresult (CUmodule *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleLoadData", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadData, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleLoadDataEx", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadDataEx, "CUresult (CUmodule *, void const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleLoadFatBinary", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleLoadFatBinary, "CUresult (CUmodule *, void const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleUnload", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleUnload, "CUresult (CUmodule)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleGetLoadingMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetLoadingMode, "CUresult (CUmoduleLoadingMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleGetFunction", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetFunction, "CUresult (CUfunction *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleGetGlobal_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetGlobal_v2, "CUresult (CUdeviceptr *, size_t *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleGetTexRef", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetTexRef, "CUresult (CUtexref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuModuleGetSurfRef", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuModuleGetSurfRef, "CUresult (CUsurfref *, CUmodule, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLinkCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkCreate_v2, "CUresult (unsigned int, CUjit_option *, void **, CUlinkState *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLinkAddData_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddData_v2, "CUresult (CUlinkState, CUjitInputType, void *, size_t, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLinkAddFile_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkAddFile_v2, "CUresult (CUlinkState, CUjitInputType, char const *, unsigned int, CUjit_option *, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLinkComplete", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkComplete, "CUresult (CUlinkState, void **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLinkDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLinkDestroy, "CUresult (CUlinkState)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemGetInfo_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetInfo_v2, "CUresult (size_t *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAlloc_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAlloc_v2, "CUresult (CUdeviceptr *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAllocPitch_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocPitch_v2, "CUresult (CUdeviceptr *, size_t *, size_t, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemFree_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemFree_v2, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemGetAddressRange_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAddressRange_v2, "CUresult (CUdeviceptr *, size_t *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAllocHost_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocHost_v2, "CUresult (void **, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemFreeHost", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeHost, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemHostAlloc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostAlloc, "CUresult (void **, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemHostGetDevicePointer_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetDevicePointer_v2, "CUresult (CUdeviceptr *, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemHostGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostGetFlags, "CUresult (unsigned int *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAllocManaged", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocManaged, "CUresult (CUdeviceptr *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetByPCIBusId", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetByPCIBusId, "CUresult (CUdevice *, char const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetPCIBusId", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetPCIBusId, "CUresult (char *, int, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuIpcGetEventHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetEventHandle, "CUresult (CUipcEventHandle *, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuIpcOpenEventHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenEventHandle, "CUresult (CUevent *, CUipcEventHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuIpcGetMemHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcGetMemHandle, "CUresult (CUipcMemHandle *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuIpcOpenMemHandle_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcOpenMemHandle_v2, "CUresult (CUdeviceptr *, CUipcMemHandle, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuIpcCloseMemHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuIpcCloseMemHandle, "CUresult (CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemHostRegister_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostRegister_v2, "CUresult (void *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemHostUnregister", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemHostUnregister, "CUresult (void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyPeer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeer, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyHtoD_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoD_v2, "CUresult (CUdeviceptr, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoH_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoH_v2, "CUresult (void *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoD_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoD_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoA_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoA_v2, "CUresult (CUarray, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyAtoD_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoD_v2, "CUresult (CUdeviceptr, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyHtoA_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoA_v2, "CUresult (CUarray, size_t, void const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyAtoH_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoH_v2, "CUresult (void *, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyAtoA_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoA_v2, "CUresult (CUarray, size_t, CUarray, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy2D_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2D_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy2DUnaligned_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DUnaligned_v2, "CUresult (CUDA_MEMCPY2D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy3D_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3D_v2, "CUresult (CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy3DPeer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeer, "CUresult (CUDA_MEMCPY3D_PEER const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAsync, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyPeerAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyPeerAsync, "CUresult (CUdeviceptr, CUcontext, CUdeviceptr, CUcontext, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyHtoDAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoDAsync_v2, "CUresult (CUdeviceptr, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoHAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoHAsync_v2, "CUresult (void *, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyDtoDAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyDtoDAsync_v2, "CUresult (CUdeviceptr, CUdeviceptr, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyHtoAAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyHtoAAsync_v2, "CUresult (CUarray, size_t, void const *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpyAtoHAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpyAtoHAsync_v2, "CUresult (void *, CUarray, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy2DAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy2DAsync_v2, "CUresult (CUDA_MEMCPY2D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy3DAsync_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DAsync_v2, "CUresult (CUDA_MEMCPY3D const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemcpy3DPeerAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemcpy3DPeerAsync, "CUresult (CUDA_MEMCPY3D_PEER const *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD8_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8_v2, "CUresult (CUdeviceptr, unsigned char, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD16_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16_v2, "CUresult (CUdeviceptr, unsigned short, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD32_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32_v2, "CUresult (CUdeviceptr, unsigned int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD2D8_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8_v2, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD2D16_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16_v2, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD2D32_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32_v2, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD8Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD8Async, "CUresult (CUdeviceptr, unsigned char, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD16Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD16Async, "CUresult (CUdeviceptr, unsigned short, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD32Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD32Async, "CUresult (CUdeviceptr, unsigned int, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD2D8Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D8Async, "CUresult (CUdeviceptr, size_t, unsigned char, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD2D16Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D16Async, "CUresult (CUdeviceptr, size_t, unsigned short, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemsetD2D32Async", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemsetD2D32Async, "CUresult (CUdeviceptr, size_t, unsigned int, size_t, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArrayCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayCreate_v2, "CUresult (CUarray *, CUDA_ARRAY_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArrayGetDescriptor_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetDescriptor_v2, "CUresult (CUDA_ARRAY_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMipmappedArrayGetSparseProperties", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetSparseProperties, "CUresult (CUDA_ARRAY_SPARSE_PROPERTIES *, CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUarray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMipmappedArrayGetMemoryRequirements", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetMemoryRequirements, "CUresult (CUDA_ARRAY_MEMORY_REQUIREMENTS *, CUmipmappedArray, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArrayGetPlane", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayGetPlane, "CUresult (CUarray *, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArrayDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArrayDestroy, "CUresult (CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArray3DCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DCreate_v2, "CUresult (CUarray *, CUDA_ARRAY3D_DESCRIPTOR const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuArray3DGetDescriptor_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuArray3DGetDescriptor_v2, "CUresult (CUDA_ARRAY3D_DESCRIPTOR *, CUarray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMipmappedArrayCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayCreate, "CUresult (CUmipmappedArray *, CUDA_ARRAY3D_DESCRIPTOR const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMipmappedArrayGetLevel", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayGetLevel, "CUresult (CUarray *, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMipmappedArrayDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMipmappedArrayDestroy, "CUresult (CUmipmappedArray)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemGetHandleForAddressRange", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetHandleForAddressRange, "CUresult (void *, CUdeviceptr, size_t, CUmemRangeHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAddressReserve", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressReserve, "CUresult (CUdeviceptr *, size_t, size_t, CUdeviceptr, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAddressFree", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAddressFree, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemCreate, "CUresult (CUmemGenericAllocationHandle *, size_t, CUmemAllocationProp const *, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemRelease", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemRelease, "CUresult (CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemMap", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemMap, "CUresult (CUdeviceptr, size_t, size_t, CUmemGenericAllocationHandle, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemMapArrayAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemMapArrayAsync, "CUresult (CUarrayMapInfo *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemUnmap", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemUnmap, "CUresult (CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemSetAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemSetAccess, "CUresult (CUdeviceptr, size_t, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemGetAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAccess, "CUresult (unsigned PY_LONG_LONG *, CUmemLocation const *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemExportToShareableHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemExportToShareableHandle, "CUresult (void *, CUmemGenericAllocationHandle, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemImportFromShareableHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemImportFromShareableHandle, "CUresult (CUmemGenericAllocationHandle *, void *, CUmemAllocationHandleType)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemGetAllocationGranularity", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationGranularity, "CUresult (size_t *, CUmemAllocationProp const *, CUmemAllocationGranularity_flags)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemGetAllocationPropertiesFromHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemGetAllocationPropertiesFromHandle, "CUresult (CUmemAllocationProp *, CUmemGenericAllocationHandle)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemRetainAllocationHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemRetainAllocationHandle, "CUresult (CUmemGenericAllocationHandle *, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemFreeAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemFreeAsync, "CUresult (CUdeviceptr, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAllocAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocAsync, "CUresult (CUdeviceptr *, size_t, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolTrimTo", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolTrimTo, "CUresult (CUmemoryPool, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAttribute, "CUresult (CUmemoryPool, CUmemPool_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolSetAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolSetAccess, "CUresult (CUmemoryPool, CUmemAccessDesc const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolGetAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolGetAccess, "CUresult (CUmemAccess_flags *, CUmemoryPool, CUmemLocation *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolCreate, "CUresult (CUmemoryPool *, CUmemPoolProps const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolDestroy, "CUresult (CUmemoryPool)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAllocFromPoolAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAllocFromPoolAsync, "CUresult (CUdeviceptr *, size_t, CUmemoryPool, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolExportToShareableHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportToShareableHandle, "CUresult (void *, CUmemoryPool, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolImportFromShareableHandle", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportFromShareableHandle, "CUresult (CUmemoryPool *, void *, CUmemAllocationHandleType, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolExportPointer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolExportPointer, "CUresult (CUmemPoolPtrExportData *, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPoolImportPointer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPoolImportPointer, "CUresult (CUdeviceptr *, CUmemoryPool, CUmemPoolPtrExportData *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuPointerGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttribute, "CUresult (void *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemPrefetchAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemPrefetchAsync, "CUresult (CUdeviceptr, size_t, CUdevice, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemAdvise", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemAdvise, "CUresult (CUdeviceptr, size_t, CUmem_advise, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemRangeGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttribute, "CUresult (void *, size_t, CUmem_range_attribute, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuMemRangeGetAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuMemRangeGetAttributes, "CUresult (void **, size_t *, CUmem_range_attribute *, size_t, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuPointerSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuPointerSetAttribute, "CUresult (void const *, CUpointer_attribute, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuPointerGetAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuPointerGetAttributes, "CUresult (unsigned int, CUpointer_attribute *, void **, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreate, "CUresult (CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamCreateWithPriority", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCreateWithPriority, "CUresult (CUstream *, unsigned int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamGetPriority", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetPriority, "CUresult (CUstream, int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetFlags, "CUresult (CUstream, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamGetCtx", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCtx, "CUresult (CUstream, CUcontext *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWaitEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitEvent, "CUresult (CUstream, CUevent, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamAddCallback", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAddCallback, "CUresult (CUstream, CUstreamCallback, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamBeginCapture_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBeginCapture_v2, "CUresult (CUstream, CUstreamCaptureMode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuThreadExchangeStreamCaptureMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuThreadExchangeStreamCaptureMode, "CUresult (CUstreamCaptureMode *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamEndCapture", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamEndCapture, "CUresult (CUstream, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamIsCapturing", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamIsCapturing, "CUresult (CUstream, CUstreamCaptureStatus *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamGetCaptureInfo", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamGetCaptureInfo_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetCaptureInfo_v2, "CUresult (CUstream, CUstreamCaptureStatus *, cuuint64_t *, CUgraph *, CUgraphNode const **, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamUpdateCaptureDependencies", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamUpdateCaptureDependencies, "CUresult (CUstream, CUgraphNode *, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamAttachMemAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamAttachMemAsync, "CUresult (CUstream, CUdeviceptr, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamQuery", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamQuery, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamSynchronize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSynchronize, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamDestroy_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamDestroy_v2, "CUresult (CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamCopyAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamCopyAttributes, "CUresult (CUstream, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamGetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamSetAttribute, "CUresult (CUstream, CUstreamAttrID, CUstreamAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEventCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreate, "CUresult (CUevent *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEventRecord", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecord, "CUresult (CUevent, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEventRecordWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventRecordWithFlags, "CUresult (CUevent, CUstream, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEventQuery", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventQuery, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEventSynchronize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventSynchronize, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEventDestroy_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventDestroy_v2, "CUresult (CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEventElapsedTime", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventElapsedTime, "CUresult (float *, CUevent, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuImportExternalMemory", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalMemory, "CUresult (CUexternalMemory *, CUDA_EXTERNAL_MEMORY_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuExternalMemoryGetMappedBuffer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedBuffer, "CUresult (CUdeviceptr *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_BUFFER_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuExternalMemoryGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuExternalMemoryGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUexternalMemory, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDestroyExternalMemory", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalMemory, "CUresult (CUexternalMemory)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuImportExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuImportExternalSemaphore, "CUresult (CUexternalSemaphore *, CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuSignalExternalSemaphoresAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSignalExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuWaitExternalSemaphoresAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuWaitExternalSemaphoresAsync, "CUresult (CUexternalSemaphore const *, CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS const *, unsigned int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDestroyExternalSemaphore", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDestroyExternalSemaphore, "CUresult (CUexternalSemaphore)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWaitValue32", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWaitValue64", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWriteValue32", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWriteValue64", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamBatchMemOp", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWaitValue32_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWaitValue64_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWaitValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWriteValue32_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue32_v2, "CUresult (CUstream, CUdeviceptr, cuuint32_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamWriteValue64_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamWriteValue64_v2, "CUresult (CUstream, CUdeviceptr, cuuint64_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuStreamBatchMemOp_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuStreamBatchMemOp_v2, "CUresult (CUstream, unsigned int, CUstreamBatchMemOpParams *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuFuncGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetAttribute, "CUresult (int *, CUfunction_attribute, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuFuncSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetAttribute, "CUresult (CUfunction, CUfunction_attribute, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuFuncSetCacheConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetCacheConfig, "CUresult (CUfunction, CUfunc_cache)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuFuncSetSharedMemConfig", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedMemConfig, "CUresult (CUfunction, CUsharedconfig)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuFuncGetModule", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncGetModule, "CUresult (CUmodule *, CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLaunchKernel", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLaunchKernelEx", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchKernelEx, "CUresult (CUlaunchConfig const *, CUfunction, void **, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLaunchCooperativeKernel", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernel, "CUresult (CUfunction, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, CUstream, void **)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLaunchCooperativeKernelMultiDevice", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchCooperativeKernelMultiDevice, "CUresult (CUDA_LAUNCH_PARAMS *, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLaunchHostFunc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchHostFunc, "CUresult (CUstream, CUhostFn, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuFuncSetBlockShape", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetBlockShape, "CUresult (CUfunction, int, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuFuncSetSharedSize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuFuncSetSharedSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuParamSetSize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetSize, "CUresult (CUfunction, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuParamSeti", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSeti, "CUresult (CUfunction, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuParamSetf", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetf, "CUresult (CUfunction, int, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuParamSetv", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetv, "CUresult (CUfunction, int, void *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLaunch", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunch, "CUresult (CUfunction)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLaunchGrid", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGrid, "CUresult (CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuLaunchGridAsync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuLaunchGridAsync, "CUresult (CUfunction, int, int, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuParamSetTexRef", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuParamSetTexRef, "CUresult (CUfunction, int, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphCreate, "CUresult (CUgraph *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddKernelNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddKernelNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphKernelNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphKernelNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetParams, "CUresult (CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddMemcpyNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemcpyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphMemcpyNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemcpyNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMCPY3D const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddMemsetNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemsetNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphMemsetNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeGetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemsetNodeSetParams, "CUresult (CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddHostNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddHostNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphHostNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeGetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphHostNodeSetParams, "CUresult (CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddChildGraphNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddChildGraphNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphChildGraphNodeGetGraph", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphChildGraphNodeGetGraph, "CUresult (CUgraphNode, CUgraph *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddEmptyNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEmptyNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddEventRecordNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventRecordNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphEventRecordNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventRecordNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddEventWaitNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddEventWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphEventWaitNodeGetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeGetEvent, "CUresult (CUgraphNode, CUevent *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphEventWaitNodeSetEvent, "CUresult (CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddExternalSemaphoresSignalNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresSignalNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExternalSemaphoresSignalNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddExternalSemaphoresWaitNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddExternalSemaphoresWaitNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExternalSemaphoresWaitNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeGetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddBatchMemOpNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddBatchMemOpNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphBatchMemOpNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeGetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphBatchMemOpNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphBatchMemOpNodeSetParams, "CUresult (CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecBatchMemOpNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecBatchMemOpNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_BATCH_MEM_OP_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddMemAllocNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemAllocNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphMemAllocNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemAllocNodeGetParams, "CUresult (CUgraphNode, CUDA_MEM_ALLOC_NODE_PARAMS *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddMemFreeNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddMemFreeNode, "CUresult (CUgraphNode *, CUgraph, CUgraphNode const *, size_t, CUdeviceptr)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphMemFreeNodeGetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphMemFreeNodeGetParams, "CUresult (CUgraphNode, CUdeviceptr *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGraphMemTrim", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGraphMemTrim, "CUresult (CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceSetGraphMemAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceSetGraphMemAttribute, "CUresult (CUdevice, CUgraphMem_attribute, void *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphClone", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphClone, "CUresult (CUgraph *, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphNodeFindInClone", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeFindInClone, "CUresult (CUgraphNode *, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphNodeGetType", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetType, "CUresult (CUgraphNode, CUgraphNodeType *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphGetNodes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphGetRootNodes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetRootNodes, "CUresult (CUgraph, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphGetEdges", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphGetEdges, "CUresult (CUgraph, CUgraphNode *, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphNodeGetDependencies", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependencies, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphNodeGetDependentNodes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetDependentNodes, "CUresult (CUgraphNode, CUgraphNode *, size_t *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphAddDependencies", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphAddDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphRemoveDependencies", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRemoveDependencies, "CUresult (CUgraph, CUgraphNode const *, CUgraphNode const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphDestroyNode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroyNode, "CUresult (CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphInstantiate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiate_v2, "CUresult (CUgraphExec *, CUgraph, CUgraphNode *, char *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphInstantiateWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphInstantiateWithFlags, "CUresult (CUgraphExec *, CUgraph, unsigned PY_LONG_LONG)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecKernelNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecKernelNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_KERNEL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecMemcpyNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemcpyNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMCPY3D const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecMemsetNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecMemsetNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_MEMSET_NODE_PARAMS const *, CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecHostNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecHostNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_HOST_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecChildGraphNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecChildGraphNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecEventRecordNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventRecordNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecEventWaitNodeSetEvent", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecEventWaitNodeSetEvent, "CUresult (CUgraphExec, CUgraphNode, CUevent)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecExternalSemaphoresSignalNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresSignalNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecExternalSemaphoresWaitNodeSetParams", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecExternalSemaphoresWaitNodeSetParams, "CUresult (CUgraphExec, CUgraphNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphNodeSetEnabled", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeSetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphNodeGetEnabled", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphNodeGetEnabled, "CUresult (CUgraphExec, CUgraphNode, unsigned int *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphUpload", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphUpload, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphLaunch", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphLaunch, "CUresult (CUgraphExec, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecDestroy, "CUresult (CUgraphExec)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDestroy, "CUresult (CUgraph)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphExecUpdate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphExecUpdate, "CUresult (CUgraphExec, CUgraph, CUgraphNode *, CUgraphExecUpdateResult *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphKernelNodeCopyAttributes", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeCopyAttributes, "CUresult (CUgraphNode, CUgraphNode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphKernelNodeGetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeGetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphKernelNodeSetAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphKernelNodeSetAttribute, "CUresult (CUgraphNode, CUkernelNodeAttrID, CUkernelNodeAttrValue const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphDebugDotPrint", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphDebugDotPrint, "CUresult (CUgraph, char const *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuUserObjectCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectCreate, "CUresult (CUuserObject *, void *, CUhostFn, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuUserObjectRetain", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRetain, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuUserObjectRelease", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuUserObjectRelease, "CUresult (CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphRetainUserObject", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphRetainUserObject, "CUresult (CUgraph, CUuserObject, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphReleaseUserObject", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphReleaseUserObject, "CUresult (CUgraph, CUuserObject, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuOccupancyMaxActiveBlocksPerMultiprocessor", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessor, "CUresult (int *, CUfunction, int, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, "CUresult (int *, CUfunction, int, size_t, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuOccupancyMaxPotentialBlockSize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSize, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuOccupancyMaxPotentialBlockSizeWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialBlockSizeWithFlags, "CUresult (int *, int *, CUfunction, CUoccupancyB2DSize, size_t, int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuOccupancyAvailableDynamicSMemPerBlock", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyAvailableDynamicSMemPerBlock, "CUresult (size_t *, CUfunction, int, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuOccupancyMaxPotentialClusterSize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxPotentialClusterSize, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuOccupancyMaxActiveClusters", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuOccupancyMaxActiveClusters, "CUresult (int *, CUfunction, CUlaunchConfig const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetArray, "CUresult (CUtexref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmappedArray, "CUresult (CUtexref, CUmipmappedArray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetAddress_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress_v2, "CUresult (size_t *, CUtexref, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetAddress2D_v3", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddress2D_v3, "CUresult (CUtexref, CUDA_ARRAY_DESCRIPTOR const *, CUdeviceptr, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetFormat", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFormat, "CUresult (CUtexref, CUarray_format, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetAddressMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetAddressMode, "CUresult (CUtexref, int, CUaddress_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetFilterMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetMipmapFilterMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapFilterMode, "CUresult (CUtexref, CUfilter_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetMipmapLevelBias", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelBias, "CUresult (CUtexref, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetMipmapLevelClamp", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMipmapLevelClamp, "CUresult (CUtexref, float, float)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetMaxAnisotropy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetMaxAnisotropy, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetBorderColor", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetBorderColor, "CUresult (CUtexref, float *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefSetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefSetFlags, "CUresult (CUtexref, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetAddress_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddress_v2, "CUresult (CUdeviceptr *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetArray, "CUresult (CUarray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmappedArray, "CUresult (CUmipmappedArray *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetAddressMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetAddressMode, "CUresult (CUaddress_mode *, CUtexref, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetFilterMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetFormat", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFormat, "CUresult (CUarray_format *, int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetMipmapFilterMode", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapFilterMode, "CUresult (CUfilter_mode *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetMipmapLevelBias", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelBias, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetMipmapLevelClamp", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMipmapLevelClamp, "CUresult (float *, float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetMaxAnisotropy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetMaxAnisotropy, "CUresult (int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetBorderColor", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetBorderColor, "CUresult (float *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefGetFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefGetFlags, "CUresult (unsigned int *, CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefCreate, "CUresult (CUtexref *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexRefDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexRefDestroy, "CUresult (CUtexref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuSurfRefSetArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefSetArray, "CUresult (CUsurfref, CUarray, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuSurfRefGetArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfRefGetArray, "CUresult (CUarray *, CUsurfref)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexObjectCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectCreate, "CUresult (CUtexObject *, CUDA_RESOURCE_DESC const *, CUDA_TEXTURE_DESC const *, CUDA_RESOURCE_VIEW_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexObjectDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectDestroy, "CUresult (CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexObjectGetResourceDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexObjectGetTextureDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetTextureDesc, "CUresult (CUDA_TEXTURE_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuTexObjectGetResourceViewDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuTexObjectGetResourceViewDesc, "CUresult (CUDA_RESOURCE_VIEW_DESC *, CUtexObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuSurfObjectCreate", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectCreate, "CUresult (CUsurfObject *, CUDA_RESOURCE_DESC const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuSurfObjectDestroy", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectDestroy, "CUresult (CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuSurfObjectGetResourceDesc", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuSurfObjectGetResourceDesc, "CUresult (CUDA_RESOURCE_DESC *, CUsurfObject)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceCanAccessPeer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceCanAccessPeer, "CUresult (int *, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxEnablePeerAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxEnablePeerAccess, "CUresult (CUcontext, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuCtxDisablePeerAccess", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuCtxDisablePeerAccess, "CUresult (CUcontext)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuDeviceGetP2PAttribute", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuDeviceGetP2PAttribute, "CUresult (int *, CUdevice_P2PAttribute, CUdevice, CUdevice)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsUnregisterResource", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnregisterResource, "CUresult (CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsSubResourceGetMappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsSubResourceGetMappedArray, "CUresult (CUarray *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsResourceGetMappedMipmappedArray", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedMipmappedArray, "CUresult (CUmipmappedArray *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsResourceGetMappedPointer_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedPointer_v2, "CUresult (CUdeviceptr *, size_t *, CUgraphicsResource)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsResourceSetMapFlags_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceSetMapFlags_v2, "CUresult (CUgraphicsResource, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsMapResources", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsMapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsUnmapResources", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsUnmapResources, "CUresult (unsigned int, CUgraphicsResource *, CUstream)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGetProcAddress", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGetProcAddress, "CUresult (char const *, void **, int, cuuint64_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGetExportTable", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGetExportTable, "CUresult (void const **, CUuuid const *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuProfilerInitialize", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerInitialize, "CUresult (char const *, char const *, CUoutput_mode)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuProfilerStart", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStart, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuProfilerStop", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuProfilerStop, "CUresult (void)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuVDPAUGetDevice", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUGetDevice, "CUresult (CUdevice *, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuVDPAUCtxCreate_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuVDPAUCtxCreate_v2, "CUresult (CUcontext *, unsigned int, CUdevice, __pyx_t_4cuda_5ccuda_VdpDevice, __pyx_t_4cuda_5ccuda_VdpGetProcAddress *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsVDPAURegisterVideoSurface", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterVideoSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpVideoSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsVDPAURegisterOutputSurface", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsVDPAURegisterOutputSurface, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_VdpOutputSurface, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsEGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsEGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_EGLImageKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamConsumerConnect", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamConsumerConnectWithFlags", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerConnectWithFlags, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamConsumerDisconnect", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamConsumerAcquireFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerAcquireFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource *, CUstream *, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamConsumerReleaseFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamConsumerReleaseFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, CUgraphicsResource, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamProducerConnect", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerConnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_EGLStreamKHR, __pyx_t_4cuda_5ccuda_EGLint, __pyx_t_4cuda_5ccuda_EGLint)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamProducerDisconnect", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerDisconnect, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamProducerPresentFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerPresentFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEGLStreamProducerReturnFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEGLStreamProducerReturnFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglStreamConnection *, __pyx_t_4cuda_5ccuda_CUeglFrame *, CUstream *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsResourceGetMappedEglFrame", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsResourceGetMappedEglFrame, "CUresult (__pyx_t_4cuda_5ccuda_CUeglFrame *, CUgraphicsResource, unsigned int, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuEventCreateFromEGLSync", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuEventCreateFromEGLSync, "CUresult (CUevent *, __pyx_t_4cuda_5ccuda_EGLSyncKHR, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsGLRegisterBuffer", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterBuffer, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGraphicsGLRegisterImage", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGraphicsGLRegisterImage, "CUresult (CUgraphicsResource *, __pyx_t_4cuda_5ccuda_GLuint, __pyx_t_4cuda_5ccuda_GLenum, unsigned int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  if (__Pyx_ImportFunction(__pyx_t_1, "_cuGLGetDevices_v2", (void (**)(void))&__pyx_f_4cuda_5_cuda_5ccuda__cuGLGetDevices_v2, "CUresult (unsigned int *, CUdevice *, unsigned int, __pyx_t_4cuda_5ccuda_CUGLDeviceList)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_RefNannyFinishContext();
  return -1;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initccuda(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initccuda(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_ccuda(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_ccuda(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  __Pyx_TraceDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'ccuda' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("ccuda", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_cuda__ccuda) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "cuda.ccuda")) {
      if (unlikely(PyDict_SetItemString(modules, "cuda.ccuda", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_init_code();
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_ccuda(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));

  /* "cuda/ccuda.pyx":1
 * # Copyright 2021-2022 NVIDIA Corporation.  All rights reserved.             # <<<<<<<<<<<<<<
 * #
 * # Please refer to the NVIDIA end user license agreement (EULA) associated
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_TraceReturn(Py_None, 0);

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init cuda.ccuda", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cuda.ccuda");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* Profile */
#if CYTHON_PROFILE
static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
                                   PyFrameObject** frame,
                                   PyThreadState* tstate,
                                   const char *funcname,
                                   const char *srcfile,
                                   int firstlineno) {
    PyObject *type, *value, *traceback;
    int retval;
    if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
        if (*code == NULL) {
            *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
            if (*code == NULL) return 0;
        }
        *frame = PyFrame_New(
            tstate,                          /*PyThreadState *tstate*/
            *code,                           /*PyCodeObject *code*/
            __pyx_d,                  /*PyObject *globals*/
            0                                /*PyObject *locals*/
        );
        if (*frame == NULL) return 0;
        if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
            Py_INCREF(Py_None);
            (*frame)->f_trace = Py_None;
        }
#if PY_VERSION_HEX < 0x030400B1
    } else {
        (*frame)->f_tstate = tstate;
#endif
    }
    __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
    retval = 1;
    __Pyx_EnterTracing(tstate);
    __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
    #if CYTHON_TRACE
    if (tstate->c_tracefunc)
        retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
    if (retval && tstate->c_profilefunc)
    #endif
        retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
    __Pyx_LeaveTracing(tstate);
    if (retval) {
        __Pyx_ErrRestoreInState(tstate, type, value, traceback);
        return __Pyx_IsTracing(tstate, 0, 0) && retval;
    } else {
        Py_XDECREF(type);
        Py_XDECREF(value);
        Py_XDECREF(traceback);
        return -1;
    }
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
    PyCodeObject *py_code = 0;
#if PY_MAJOR_VERSION >= 3
    py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
    if (likely(py_code)) {
        py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
    }
#else
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    py_funcname = PyString_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    py_srcfile = PyString_FromString(srcfile);
    if (unlikely(!py_srcfile)) goto bad;
    py_code = PyCode_New(
        0,
        0,
        0,
        CO_OPTIMIZED | CO_NEWLOCALS,
        __pyx_empty_bytes,     /*PyObject *code,*/
        __pyx_empty_tuple,     /*PyObject *consts,*/
        __pyx_empty_tuple,     /*PyObject *names,*/
        __pyx_empty_tuple,     /*PyObject *varnames,*/
        __pyx_empty_tuple,     /*PyObject *freevars,*/
        __pyx_empty_tuple,     /*PyObject *cellvars,*/
        py_srcfile,       /*PyObject *filename,*/
        py_funcname,      /*PyObject *name,*/
        firstlineno,
        __pyx_empty_bytes      /*PyObject *lnotab*/
    );
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
#endif
    return py_code;
}
#endif

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* None */
static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) {
  int err;
  #ifdef WITH_THREAD
  PyGILState_STATE _save = PyGILState_Ensure();
  #endif
  err = !!PyErr_Occurred();
  #ifdef WITH_THREAD
  PyGILState_Release(_save);
  #endif
  return err;
}

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* FunctionExport */
static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

/* FunctionImport */
#ifndef __PYX_HAVE_RT_ImportFunction
#define __PYX_HAVE_RT_ImportFunction
static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;
    d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
    if (!d)
        goto bad;
    cobj = PyDict_GetItemString(d, funcname);
    if (!cobj) {
        PyErr_Format(PyExc_ImportError,
            "%.200s does not export expected C function %.200s",
                PyModule_GetName(module), funcname);
        goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    if (!PyCapsule_IsValid(cobj, sig)) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
        goto bad;
    }
    tmp.p = PyCapsule_GetPointer(cobj, sig);
#else
    {const char *desc, *s1, *s2;
    desc = (const char *)PyCObject_GetDesc(cobj);
    if (!desc)
        goto bad;
    s1 = desc; s2 = sig;
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    if (*s1 != *s2) {
        PyErr_Format(PyExc_TypeError,
            "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
             PyModule_GetName(module), funcname, sig, desc);
        goto bad;
    }
    tmp.p = PyCObject_AsVoidPtr(cobj);}
#endif
    *f = tmp.fp;
    if (!(*f))
        goto bad;
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(d);
    return -1;
}
#endif

/* InitStrings */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
